Earlier this year Python 2 entered End of Life — and Splunk has already released versions of Splunk Cloud and Splunk Enterprise that provide a Python 3 runtime. As the developer of an app that is published to Splunkbase, if your app contains Python code, you need to update it to work with Python 3 and Splunk Enterprise 8.0 by July 1, 2020 as the Splunk Enterprise and Splunk Cloud releases after that date will no longer support the Python 2 runtime. You may be wondering: what is the easiest way to migrate my app and my app’s customers to Python 3 and Splunk 8.0?
You can of course upgrade your app directly to Python 3. If you take this path, your app will only be compatible with Splunk Enterprise 8.0 — customers on Splunk Enterprise 7.x will not be able to use these versions of your app. This means that they will need to follow a more complicated upgrade process in order to update Splunk Enterprise and your app in the future. To help you make an informed decision, you can see how many customers are using your app on specific versions of the Splunk Enterprise platform by consulting the “View Analytics” page of your app’s listing on Splunkbase.
Because of this extra complexity for our shared customers, we strongly recommend creating a release of your app that is cross-compatible with both Python 2 and Python 3 (using libraries like Six, Futurize, or 2to3), with one or more versions of Splunk Enterprise 7.2 or above, and with Splunk Enterprise 8.0. If you take this approach, your customers will simply need to update their installation of your app to its latest release, then update their Splunk Cloud installation to 8.0 without having to worry about Python compatibility along the way; the app will just work. You can learn more here about the Splunk Enterprise migration process for Python 3.
Whichever approach you take, Splunk has compiled a handy Python migration checklist for you to use during your upgrade process. The detailed list can be found here. It includes common issues such as:
If you are following our recommendation above and making your app cross-compatible with both versions of Python, you will need to test your application in at least two Splunk Enterprise test deployments:
If you are creating an app that only runs in Python 3, you will only need a test environment for Splunk Enterprise 8.0.
Note: Keep in mind that if your app uses Python that runs in the appserver, such as in the module system, you will not be able to select which Python runtime will be used for these scripts. Splunk Enterprise versions previous to Splunk Enterprise 8.0 will always attempt to run these scripts with Python 2, and Splunk Enterprise 8.0 will always attempt to run these scripts with Python 3. More information is available here. Because of this, any app that you upload to Splunkbase and flag as 8.0 compatible must be Python 3 compatible.
You can use the following Splunk-built tools to validate that your app is ready for Splunk Enterprise 8.0. At the same time, to expand your potential user base for your new release, you should also validate your app’s compatibility with Splunk Cloud:
Finally, upload the new release of your app to Splunkbase and indicate that it is compatible with Splunk Enterprise 8.0. The process is documented at this link.
If you have any questions, reach out to us at python27-eol@splunk.com
Best,
Splunk Python Migration Team
----------------------------------------------------
Thanks!
Tedd Hellmann
The Splunk platform removes the barriers between data and action, empowering observability, IT and security teams to ensure their organizations are secure, resilient and innovative.
Founded in 2003, Splunk is a global company — with over 7,500 employees, Splunkers have received over 1,020 patents to date and availability in 21 regions around the world — and offers an open, extensible data platform that supports shared data across any environment so that all teams in an organization can get end-to-end visibility, with context, for every interaction and business process. Build a strong data foundation with Splunk.