Upgrade from substance 0 to 1¶
Upgrading from substance 0 to 1 requires moving your dependencies from Python 2 to Python 3 and VirtualBox 6.0.
Upgrading on macOS¶
Stop all your engines:
$ substance engine ls $ substance engine halt <ENGINENAME> # Do this for every running engine
Uninstall substance:
$ sudo pip uninstall substance
Upgrade VirtualBox to 6.x:
- Visit https://www.virtualbox.org/wiki/Downloads - Install the package on your computer. - Your existing machines and engines should remain intact.
Upgrade Python to Python 3:
$ brew uninstall python $ brew uninstall python@2 $ brew install python
Install
substance
:$ sudo pip3 install substance
Upgrade your engine by either creating a new engine.
Upgrading on Windows¶
Stop all your engines:
$ substance engine ls $ substance engine halt <ENGINENAME> # Do this for every running engine
Uninstall substance via cygwin:
$ sudo pip uninstall substance
Upgrade VirtualBox to 6.x:
- Visit https://www.virtualbox.org/wiki/Downloads - Install the package on your computer. - Your existing machines and engines should remain intact.
Upgrade Python to Python 3:
- Run the Cygwin setup (setup-x86_64.exe)
- Remove python, python-devel and python-pip
- Add python3, python3-devel, python3-pip
Install
substance
using the Cygwin terminal:$ sudo pip3 install substance
Upgrading on Linux¶
Update your system.:
# Debian/Ubuntu $ sudo apt-get update && sudo apt-get upgrade # Arch $ sudo pacman -Syu
Reboot:
- needed in case the virtualbox kernel modules were updated.
Stop all your engines:
$ substance engine ls $ substance engine halt <ENGINENAME> # Do this for every running engine
Install python3:
# Debian/Ubuntu $ sudo apt-get install -y python3.7 python3-pip # Arch $ sudo pacman -S python python-pip
Update substance:
$ sudo pip3 install substance
You will need to create a new engine so that it can use the newest docker image and virtualbox version:
$ substance engine create <ENGINENAME>
Post-Install steps¶
After upgrading to substance 1.x, you should take a moment to update your jinja templates to use Python 3 syntax.
# example: # dockwrkr.yml.jinja [...] VAR_NMAILER_REMOTE_PORT: "587" VAR_NMAILER_REMOTE_USER: "" VAR_NMAILER_REMOTE_PASS: "" {%- for k, v in SUBENV_VARS.iteritems() %} # becomes [...] VAR_NMAILER_REMOTE_PORT: "587" VAR_NMAILER_REMOTE_USER: "" VAR_NMAILER_REMOTE_PASS: "" {%- for k, v in SUBENV_VARS.items() %}
Known issues¶
- If you get a
CryptographyDeprecationWarning
when running substance commands, it’s because of this issue. As noted, a workaround is runningsudo pip install cryptography==2.4.2
until the problem is fixed in paramiko.