Splunk® Enterprise

Installation Manual

Download manual as PDF

Download topic as PDF

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:

  1. Resolve upgrade blockers
  2. Upgrade Splunkbase apps and validate
  3. Upgrade Splunk Enterprise

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

  1. (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.
  2. 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.
  3. 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.
  4. 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:

  1. Remove all Advanced XML.
  2. If you are running SplunkWeb Legacy Mode, disable it by editing %SPLUNK_HOME%\etc\system\local\web.conf to remove the appServerPorts and httpport attributes.
  3. Adjust custom Mako templates to be compatible with both Python 2 and Python 3.
  4. 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:

  1. 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.
  2. 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:

  1. Upgrade to Splunk Enterprise 8.0.
  2. Note any potential breaking changes, such as apps that aren't compatible yet with Splunk Enterprise 8.0 at time of upgrade.
  3. Install any apps that are only compatible with Python 3 and Splunk Enterprise 8.0.
  4. Set your scripts to run Python 3 over time only.
  5. (Optional) Specify the global Python 3 runtime in your production environment. Go to $SPLUNK_HOME/etc/system/local/server.conf and set python.version=python3.
  6. Start Splunk Enterprise.
PREVIOUS
Upgrade using the Python 3 runtime and dual-compatible Python syntax in custom scripts
  NEXT
Uninstall Splunk Enterprise

This documentation applies to the following versions of Splunk® Enterprise: 8.0.0, 8.0.1


Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters