Cloud customer?
 Upgrade in MyJFrog >

Search





Overview

The procedure to upgrade Mission Control depends on your installation type. We strongly recommend reading through this page before proceeding with your upgrade.

Before you upgrade Mission Control please refer to additional information on supported platforms, browsers and other requirements, and the system architecture.

Note: Make sure to use the same upgrade method (RPM, Debian, Docker, etc.) as the one you initially used to install Mission Control.

Upgrading to version 4.x for the first time?

It is recommended that you first review what's new with the latest JFrog Platform. Review the breaking changes, deprecated features and more.

Before You Proceed

JFrog Mission Control 4.x can only be installed as part of the JFrog Platform Deployment installation. Make sure this installation is completed first before continuing.

Default Home Directory

The default Mission Control home directory is defined according to the installation type. For additional details see the Product Directory Structure page.

Note: This guide uses $JFROG_HOME to represent the JFrog root directory containing the deployed product.

Page Contents


Upgrading from Versions below 3.5.1

To upgrade from version 3.5 and below, you first need to upgrade to version 3.5.1 as described in the Upgrading Mission Control v3 documentation, and then continue to upgrading from version 3.5.1 to 4.x.

Upgrading from version 3.5 and below to 4.x is not supported.


Upgrading from Version 3.5.1 to 4.x

JFrog Mission Control v4.x is only compatible with JFrog Artifactory v7.x. To upgrade, you must first install JFrog Artifactory 7.x.

There are several new concepts introduced in Mission Control 4.x, improving the installation and customization process.

To upgrade to version 4.x, you'll need to first unpack the installer archive of mission control, without installing the services, and export/import your licenses using the below migration procedure.

Data other than your licenses, such as your service information and insight, will not be available after the upgrade.
  1. Download Mission Control.
  2. Extract the contents of the compressed archive and go to the extracted folder.

    tar -xvf jfrog-mc-<version>-<compose|rpm|deb>.tar.gz
    cd jfrog-mc-<version>-<compose|rpm|deb>

    .env file included within the Docker-Compose archive

    This .env file is used by docker-compose and is updated during installations and upgrades.

    Notice that some operating systems do not display dot files by default. If you make any changes to the file, remember to backup before an upgrade.

  3. Copy the jfmcDataExport.sh migration script from the <extracted folder>/third-party/postgresql/ directory, to the /tmp directory of the machine (or container) hosting your Mission Control v3.5.1 database.
    For Linux Archive installation, the script will be at 
    <extract-folder>/app/third-party/postgresql.
  4. Run the following commands on the machine (or container) hosting the Mission Control v3.5.1 database.

    Native Postgres Installation
    chown postgres:postgres /tmp/jfmcDataExport.sh
    cd /tmp/
    su postgres -c "POSTGRES_PATH=/opt/PostgreSQL/9.6/bin PGPASSWORD=password bash /tmp/jfmcDataExport.sh --output=/tmp"
    Postgres in Docker container
    docker exec -it <postgres_container_id> bash
    su postgres -c "POSTGRES_PATH=/usr/lib/postgresql/9.6/bin PGPASSWORD=password bash /tmp/jfmcDataExport.sh --output=/tmp"
    docker cp <postgres_container_id>:/tmp/jfmcDataExport.tar.gz /tmp/jfmcDataExport.tar.gz
    # If database host is different from JFrog Mission Control host,
    # Then copy /tmp/jfmcDataExport.tar.gz from database host to JFrog Mission Control host (e.g. with scp) 
    commmand-line options
    --host=HOST           database server host (default: "127.0.0.1")
    --port=PORT           database server port (default: "5432")
    --user=USER           database user name (default: "jfmc")
    --database=DATABASE   database name to connect to (default: "mission_control")
    --schema=SCHEMA       database schema name to connect to (default: "jfmc_server")
    --output=OUTPUT       path to output dir where jfmcDataExport.tar.gz will be created (default: ".")
  5. Check the output of the above command.

    2019-10-28T16:13:18.277Z [shell] [INFO ] [] [jfmcDataExport.sh:425 ] [main] - Exporting license buckets...
    2019-10-28T16:13:18.313Z [shell] [INFO ] [] [jfmcDataExport.sh:428 ] [main] - Exporting managed licenses...
    2019-10-28T16:13:18.349Z [shell] [INFO ] [] [jfmcDataExport.sh:419 ] [main] - Bundling exported data...
    2019-10-28T16:13:18.365Z [shell] [INFO ] [] [jfmcDataExport.sh:421 ] [main] - Mission Control data dumped to: ./jfmcDataExport.tar.gz
  6. Run the command to erase old package for RPM and Debian installs. For zip, you need to stop and proceed. 

    Note: This step is only needed when you are installing Mission Control 4.x on the same server where the old version was running.

    RPM - Remove old packages
    # Uninstall Mission Control
    yum remove jfmc
    rm -fr /var/opt/jfrog/mission-control
    
    # Uninstall PostgreSQL
    /opt/PostgreSQL/9.6/uninstall-postgresql
    rm -fr /var/opt/postgres
    #For SystemD systems
    rm -fr /lib/systemd/system/postgresql-9.6.service /etc/systemd/system/multi-user.target.wants/postgresql-9.6.service
    systemctl daemon-reload
    systemctl reset-failed
    #For SystemV systems
    
    
    # Uninstall Elasticsearch
    yum remove -y elasticsearch-oss
    rm -fr /etc/elasticsearch
    rm -fr /usr/share/elasticsearch
    Docker Insallations - stop and remove the containers
    # For docker-compose installations
    docker-compose  -f ./jfmc-compose.json -p jfmc down 
    
    # For docker installations
    mission-control stop
    docker ps -a --format '{{.Names}}' | grep ^jfmc_* | xargs docker rm -f
    Debian - Remove old package
    # Uninstall Mission Control
    apt-get purge jfmc
    rm -fr /var/opt/jfrog/mission-control
    
    # Uninstall PostgreSQL
    /opt/PostgreSQL/9.6/uninstall-postgresql
    rm -fr /var/opt/postgres
    rm -rf /var/spool/mail/postgres
    rm -rf /opt/PostgreSQL
    rm -rf /tmp/postgresql_installer_*
    rm -rf /etc/selinux/targeted/active/modules/100/postgresql
    #For SystemD systems
    rm -fr /lib/systemd/system/postgresql-9.6.service /etc/systemd/system/multi-user.target.wants/postgresql-9.6.service
    systemctl daemon-reload
    systemctl reset-failed
    #For SystemV systems
    rm -rf  /etc/init.d/postgres-9.6
    
    
    # Uninstall Elasticsearch
    apt-get purge elasticsearch-oss
    rm -fr /etc/elasticsearch
    rm -fr /usr/share/elasticsearch
    
  7. Install Mission Control v4.x.
  8. Copy the exported data.

    mkdir -p $JFROG_HOME/mc/var/bootstrap/mc
    cp /tmp/jfmcDataExport.tar.gz $JFROG_HOME/mc/var/bootstrap/mc
    
    # NOTE : The following is needed only for docker-compose installer
    chown -R 1050:1050 $JFROG_HOME/mc/var/bootstrap 
  9. Restart Mission Control.

  10. Validate that the import was successful. The filename should be renamed to jfmcDataExport.tar.gz.done. It will be renamed to jfmcDataExport.tar.gz.failed if the import procedure has failed.
  11. Check the Mission Control log.

    tail -f $JFROG_HOME/mc/var/log/console.log

Upgrading from Version 4.x to 4.x

The following upgrade methods are supported:

Interactive Script Upgrade (Recommended)

This supports all install types, including Docker Compose, RPM and Debian.

  1. Stop the service.

    systemd OS
    systemctl stop mc
    systemv OS
    service mc stop
    Docker Compose
    cd jfrog-mc-<version>-compose
    docker-compose -p mc down
  2. Extract the contents of the compressed archive and go to the extracted folder.
    Note: Make sure to merge your customizations in your current docker-compose.yaml file to the new extracted version of the docker-compose.yaml file.

    tar -xvf jfrog-mc-<version>-<compose|rpm|deb>.tar.gz
    cd jfrog-mc-<version>-<compose|rpm|deb>

    Copy the contents of the .env file in the previous installation to the newly created .env file in this archive without copying the versions, as this will affect the upgrade.

  3. Run the installer script.
    Note: if needed, the script will prompt you with a series of mandatory inputs, including the jfrogURL (custom base URL) and joinKey.

    Compose
    ./config.sh
    RPM/DEB
    ./install.sh
  4. Start and manage the Mission Control service.

    systemd OS
    systemctl start|stop mc
    systemv OS
    service mc start|stop
    Docker Compose
    cd jfrog-mc-<version>-compose
    docker-compose -p mc up -d
    docker-compose -p mc ps
    docker-compose -p mc down
  5. Access Mission Control from your browser at: http://<jfrogUrl>/ui/, go the Dashboard tab in the Application module in the UI.
  6. Check Mission Control Log.

    tail -f $JFROG_HOME/mc/var/log/console.log

Manual RPM/Debian Upgrade

  1. Stop the current server.

    systemd OS
    systemctl stop mc
    systemv OS
    service mc stop
  2. Extract the contents of the compressed archive and go to the extracted folder.

    tar -xvf jfrog-mc-<version>-<rpm|deb>.tar.gz
    cd jfrog-mc-<version>-<rpm|deb>
  3. Install Mission Control as a service on Red Hat compatible Linux distributions, as a root user.

    rpm
    yum -y install ./mc/mc.rpm
    Debian
    dpkg -i ./mc/mc.deb
  4. Set the Artifactory connection details.
  5. Start and manage Mission Control.

    service mc start|stop
  6. Access Mission Control from your browser at: http://<jfrogUrl>/ui/, go the Dashboard tab in the Application module in the UI.

  7. Check Mission Control Log.

    tail -f $JFROG_HOME/mc/var/log/console.log

Linux Archive Upgrade

  1. Stop the current server.

    Stop Mission Control
    cd $JFROG_HOME/mc/app/bin
    ./mc.sh stop
  2. Extract the contents of the compressed archive and go to the extracted folder.

    Untar
    tar -xvf jfrog-mc-<version>-linux.tar.gz
  3. Replace the existing $JFROG_HOME/mc/app with the new app folder.

    Upgrade
    # Export variables to simplify commands
    export JFROG_HOME=/opt/jfrog
    export JF_NEW_VERSION=/opt/jfrog/mc-4.x
    
    # Remove app
    rm -rf $JFROG_HOME/mc/app
    
    # Copy new app
    cp -r $JF_NEW_VERSION/app $JFROG_HOME/mc
    
    # Remove extracted new version
    rm -rf $JF_NEW_VERSION
    
  4. Run the migration script to remove old service directories.

    Run the migration script with the same privileges as you have in your current Mission Control installation. This script will remove old services directories, redundant service yaml files in router  and translate your current configurations to the new configuration format, according to the new file system layout.
    
    $JFROG_HOME variable points to the new installation
    export JFROG_HOME=<Full path to jfrog directory, for example: /opt/jfrog>
    cd $JFROG_HOME/mc/app/bin
    ./migrate.sh
    Check that the migration has completed successfully, by reviewing the following files:
     - migration log: $JFROG_HOME/mc/var/log/migration.log
    - system.yaml configuration: $JFROG_HOME/mc/var/etc/system.yaml
       This newly created file will contain your current custom configurations in the new format.
  5. Manage Mission Control.

    $JFROG_HOME/app/bin/mc.sh start|stop
  6. Access Mission Control from your browser at: http://<jfrogUrl>/ui/, go the Dashboard tab in the Application module in the UI.
  7. Check Mission Control Log.

    tail -f $JFROG_HOME/mc/var/log/console.log

Helm Upgrade

Once you have a new chart version, you can update your deployment.

Non-Compatible Upgrades

In cases where a new version is not compatible with existing deployed version (see the relevant Changelog), you will need to do the following:

  • Deploy a new version along side the old version (and set a new release name)
  • Copy configurations and data from old deployment to the new one
Downtime is required to perform an upgrade.

Data export is done with a migration script called jfmcDataExport.sh (available under the files directory in the Mission Control chart).

To upgrade.

  1. Verify that you have upgraded Artifactory to v.7x. For more information, see Helm Upgrade.
  2. Update the existing deployed version to the updated version.

    helm upgrade mission-control center/jfrog/mission-control
  3. Stop the old Mission Control pod (scale down replicas to 0) (PostgreSQL remains in place).

    $ kubectl scale statefulsets <OLD_RELEASE_NAME>-mission-control --replicas=0
  4. Export data from the old PostgreSQL instance in the following way.
    1. Connect to the old PostgreSQL pod (you can get the name by running kubectl get pods).

      $ kubectl exec -it <OLD_RELEASE_NAME>-postgresql bash
    2. Copy the jfmcDataExport.sh file and run the following commands.

      $ kubectl cp ./jfmcDataExport.sh <OLD_RELEASE_NAME>-postgresql:/tmp/jfmcDataExport.sh
      $ chown postgres:postgres /tmp/jfmcDataExport.sh
      $ su postgres -c "PGPASSWORD=password bash /tmp/jfmcDataExport.sh --output=/tmp"
      if you are on 2x charts(operating system user postgres is not there) run ./jfmcDataExport.sh --output=/tmp and provide jfmc user password
    3. Copy the exported file to your local system.

      $ kubectl cp <OLD_RELEASE_NAME>-postgresql:/tmp/jfmcDataExport.tar.gz ./jfmcDataExport.tar.gz
  5. Install the new Mission Control and copy the exported file.
    1. Run the helm install with the new version called mission-control-new.
    2. Copy the exported tar file to the new Mission Control pod.

      $ kubectl cp ./jfmcDataExport.tar.gz <NEW_RELEASE_NAME>-mission-control:/opt/jfrog/mc/var/bootstrap/mc/jfmcDataExport.tar.gz -c mission-control
    3. Restart the new Mission Control pod.
    4. Validate that the import was successful. The filename should be renamed to jfmcDataExport.tar.gz.done (it will be renamed to jfmcDataExport.tar.gz.failed if the import procedure failed).
  6. Run the following command to remove the old Mission Control deployment and Helm release.

    helm delete <OLD_RELEASE_NAME>
  7. Access Mission-Control from your browser at: http://<jfrogUrl>/ui/, then go to the Security & Compliance tab in the Application module in the UI.

  8. Check the status of your deployed Helm releases.

    helm status mission-control

    Mission Control should now be available.

  • No labels
Copyright © 2020 JFrog Ltd.