Migration operations¶
Migrating the base port¶
It is possible to change the base port of an existing Agent Management instance, by editing the installation configuration file:
Stop Agent Management
DATADIR/bin/dss stopEdit the
DATADIR/install.iniinstallation configuration file[server] port = NEW_BASE_PORT
Regenerate Agent Management configuration
DATADIR/bin/dssadmin regenerate-configRestart Agent Management
DATADIR/bin/dss start
Migrating the installation directory¶
It is possible to change the installation directory of an existing Agent Management instance, by replaying the installer in “upgrade” mode:
Stop Agent Management
DATADIR/bin/dss stopMove the installed kit to its new location (or unpack the .tar.gz distribution archive to a new location)
mv OLD_DIR/dataiku-dss-VERSION NEW_DIR/ # or cd NEW_DIR tar xf /PATH/TO/dataiku-dss-VERSION.tar.gz
Run the installer in upgrade mode
NEW_DIR/dataiku-dss-VERSION/installer.sh -d DATA_DIR -u
If you have configured Agent Management with User Isolation Framework, run the impersonation installation step as
rootfromDATADIR./bin/dssadmin install-impersonation DSSUSER
Restart Agent Management
DATADIR/bin/dss start
Migrating the data directory¶
It is possible to change the path of the data directory of an existing Agent Management instance, by replaying the installer in “upgrade” mode. Note that the Python virtual environment has to be rebuilt after migration. This is because Python virtual environments embed their installation path in various places.
Stop Agent Management
DATADIR/bin/dss stopSave the list of locally-installed Python packages
DATADIR/bin/pip freeze -l >local-python-packages.txt
Move the data directory to its new location
mv DATADIR NEWDATADIR
Remove the Python virtualenv, keeping a backup copy
mv NEWDATADIR/pyenv NEWDATADIR/pyenv.backup
Run the installer in upgrade mode. This recreates the Python virtualenv
dataiku-dss-VERSION/installer.sh -d NEWDATADIR -u
Reinstall locally-installed Python packages (if any)
NEWDATADIR/bin/pip install -r local-python-packages.txt
If you have configured Agent Management with User Isolation Framework:
As
root, edit the file/etc/dataiku-security/INSTALL_ID/security/security-config.inito update, in sectiondirs, the path underdss_data_dir. For information on finding INSTALL_ID, see Initial Setup.Still as
root, update the paths in sudoers file/etc/sudoers.d/dataiku-dss-<dss_user>-<dss_instance_id>to point toNEWDATADIRStill as
root, either:Run
NEWDATADIR/bin/dssadmin install-impersonation DSSUSERto updateNEWDATADIR/security/execwrapper.shOr, edit
NEWDATADIR/security/execwrapper.shand update the path toCONFIGDIRto point toNEWDATADIR
Restart Agent Management
NEWDATADIR/bin/dss startIf you have configured Agent Management to start automatically on server boot:
Re-run the
install-boot.shcommand (as root), orDirectly adjust the data directory path in the service configuration file, which you can locate with:
ls -l /etc/default/dataiku* /etc/sysconfig/dataiku*
When everything is considered stable, remove the backup
rm -rf NEWDATADIR/pyenv.backup
Note
If you could not save the list of locally-installed Python packages before migration (step 2 above), it is possible to reconstitute it by looking at the package installation directory:
ls -l NEWDATADIR/pyenv.backup/lib/python?.?/site-packages
Migrating Agent Management to start with a new user¶
To switch the user that runs Agent Management or to switch Agent Management to run with a service account, you will perform a migration operation. In this section:
olddssuseris the original UNIX user which runs the Agent Management software
newdssuseris the new UNIX user to run the Agent Management software
Before you start, make sure you have a backup of your data directory. If you don’t have one, create one now.
As the user
olddssuser, stop Agent Management:DATADIR/bin/dss stopUpdate the ownership of your install directory and data directory so that the new UNIX user
newdssuserhas proper access/permissions:sudo chown -Rh NEW_USER:NEW_GROUP INSTALLDIR DATADIR
As the new
newdssuser, re-run installer in upgrade mode:INSTALLDIR/installer.sh -d DATADIR -u
If you have UIF configured in your environment, re-run the install-impersonation script as root, to point to the new
newdssuser:./DATADIR/bin/dssadmin install-impersonation newdssuser
As the new
newdssuserunix user, restart Agent Management:DATADIR/bin/dss startIf you have a boot-up script installed, set start on boot to the new
newdssuser. Note that INSTALLDIR and DATADIR must be referenced by their full paths:sudo -i INSTALLDIR/scripts/install/install-boot.sh DATADIR newdssuser