Upgrade using the Python 2 runtime and make minimal changes to Python code
Use this upgrade path if you want to continue using the Python 2 runtime as much as possible. To see the other upgrade path option and choose the upgrade path that is best for you, see Choose your Splunk Enterprise upgrade path for the Python 3 migration.
This upgrade path has three parts:
Resolve upgrade blockers
In preparation to migrate to Python 3 during your upgrade to version 8.0, take the following steps. Using a test environment is optional. If you don't use a test environment, this process might impact performance. See Performance considerations in the Splunk Platform Upgrade Readiness App manual for more information.
Prepare for upgrade with the Splunk Platform Readiness app
- (Optional) In a test environment, install all your production apps and replicate any custom scripts you've included in your production environment outside of an app context.
- Install the Splunk Platform Upgrade Readiness App and run it, preferably on your test instance. See About the Splunk Platform Upgrade Readiness App in the Splunk Platform Upgrade Readiness App manual for more information.
- Review the test results for your private apps and follow the instructions in the Upgrade Readiness App for any items marked BLOCKER to resolve the issue.
- Review the test results for the apps you downloaded from Splunkbase and check for file paths that contain content that you customized or extended. Address any issues before continuing.
Manually prepare for upgrade
If you choose not to use the Upgrade Readiness App, manually check your Splunk Enterprise deployment for issues. Confirm you've met these upgrade readiness requirements in your private apps and extensions before you continue:
- Remove all Advanced XML.
- If you are running SplunkWeb Legacy Mode, disable it by editing
%SPLUNK_HOME%\etc\system\local\web.confto remove the
- Adjust custom Mako templates to be compatible with both Python 2 and Python 3.
- Adjust custom CherryPy endpoints in apps to be compatible with Python 2 and Python 3.
For more information about these upgrade requirements, see Python 3 migration with the Splunk platform in the Python 3 Migration manual.
Upgrade Splunkbase apps and validate
Only after you have completed all the preparation steps, upgrade to Splunk Enterprise 8.0 in a test environment, following the three-phase Splunk Enterprise upgrade process. For more information, see Splunk Enterprise upgrade process.
To reduce performance impact, upgrade to Splunk Enterprise 8.0 in a test environment first to test for breaking changes. Don't upgrade in your production environment directly.
Follow these steps to validate your upgrade in your test environment:
- Test your Splunk Web-dependent Python by accessing all views that rely on custom CherryPy endpoints or Mako templates and ensuring that they function as expected.
- Upgrade your installed Splunkbase apps to versions that support Splunk Enterprise 8.0 and test for any breaking changes. If the developer hasn't provided a version of the app that is compatible with Splunk Enterprise 8.0, update it yourself to meet the requirements, or remove the app.
Upgrade Splunk Enterprise
Upgrade your production environment to version 8.0 on your search heads, indexers, and forwarders, following the three-phase Splunk Enterprise upgrade process. For more information, see Splunk Enterprise upgrade process. As you upgrade the components of your deployment, follow this order of operations:
- Upgrade to Splunk Enterprise 8.0.
- Note any potential breaking changes, such as apps that aren't compatible yet with Splunk Enterprise 8.0 at time of upgrade.
- Install any apps that are only compatible with Python 3 and Splunk Enterprise 8.0.
- Set your scripts to run Python 3 over time only.
- (Optional) Specify the global Python 3 runtime in your production environment. Go to
- Start Splunk Enterprise.
Upgrade using the Python 3 runtime and dual-compatible Python syntax in custom scripts
Uninstall Splunk Enterprise
This documentation applies to the following versions of Splunk® Enterprise: 8.0.0, 8.0.1, 8.0.2