Skip to content

Installing Your CodeLogic Server on Ubuntu

You must ensure that your system meets the specifications outlined in the CodeLogic Installation Requirements.

Note

Internet access is only needed for installation and upgrading. Once installed, the CodeLogic Server is the package repository for the Linux and Windows agents.

All sample output is for reference only, it may differ on your system.

An ellipsis (…) indicates omitted output.

CodeLogic offers two types of installers for the CodeLogic Server.

Select one of the installer types to expand the instructions.

  • Install Docker
    • From the CLI run the following command:
      snap install docker
      
  • Install CodeLogic
    • There are two ways to get the Snap install:
      • Go to https://snapcraft.io/store, search for CodeLogic, click Install.
      • Alternatively, you can use your CLI and run the following command:
        snap install codelogic
        
  • Configure CodeLogic

    • Allow Docker to run in the CodeLogic Snap with the following command:
      snap connect codelogic:docker-executables docker:docker-executables
      
    • From the CLI run the following command:
      codelogic.pre-start-codelogic
      
    • The script will confirm the protocol (http or https), hostname or IP address, and create a self-signed certificate for testing purposes.

      • If a signed certificate is available now, answer N to the Allow HTTP? question.

      Note

      A self-signed certificate will be created regardless of the answer. The answer to this question determines the protocol (http or https) used for the software repository.

      • For example, if http://myserver.com is entered, the package repositories will use http. If https://myserver.com is entered, the package repositories will use https.
    • Create a CodeLogic Administrator Account with an email address and password.

    Note

    The password must be between 8 and 256 characters in length (numbers, symbols, and mixed-case letters allowed).

    • Snap continues with the installation process. When finished, you will receive a message that the CodeLogic started correctly.
  • Install a signed TLS certificate on the server

    • The signed TLS certificate and key file names must be named codelogic.crt and codelogic.key.
    • Copy the signed TLS certificate and key to /var/snap/codelogic/current/opt/codelogic/certs/ and restart the CodeLogic Server.

    Important

    The certificate must be signed by a certificate authority. Although a self-signed certificate allows access to the GUI, the agents will not accept a self-signed certificate. For more information, see Using Internally Generated Certificates.

  • Log in to the Server

    • The CodeLogic Server address is listed in the output. Open a browser on your computer and go to your CodeLogic Server. Log in to CodeLogic using the username and password you provided during installation.

    Note

    It may take a few minutes after installation is complete for log in to be available.

Before You Begin

If you do not have internet access, see Commands for the command to list the dependencies for the CodeLogic Server. You will need to have the listed dependencies installed before installing CodeLogic.

  • Install
    • Install the CodeLogic Key Using apt-key
      wget -qO- http://repo.codelogic.com/debian/archive.key | sudo apt-key add -
      
  • Add the CodeLogic Repository to the Package Database

    sudo add-apt-repository --update 'deb http://repo.codelogic.com/debian /'
    

    Sample Output
    $ sudo add-apt-repository --update 'deb http://repo.codelogic.com/debian /'  
    …  
    Get:5 http://repo.codelogic.com/debianPackages [797 B]  
    …  
    Fetched 10.2 MB in 9s (1,169 kB/s)  
    Reading package lists... Done
    
    • Install the CodeLogic Server
      sudo apt-get install --assume-yes -f codelogic
      
    Sample Output
    # sudo apt-get install --assume-yes -f codelogic  
    Reading package lists... Done  
    Building dependency tree  
    Reading state information... Done  
    The following NEW packages will be installed:  
    codelogic  
    0 upgraded, 1 newly installed, 0 to remove and 43 not upgraded.  
    Need to get 0 B/2,291 kB of archives.  
    After this operation, 8,751 kB of additional disk space will be used.  
    Selecting previously unselected package codelogic.  
    (Reading database ... 164240 files and directories currently installed.)  
    Preparing to unpack .../codelogic_21.1.0_all.deb ...  
    Unpacking codelogic (21.1.0) ...  
    Setting up codelogic (21.1.0) ...  
    Created symlink /etc/systemd/system/default.target.wants/codelogic.service → /lib/systemd/system/codelogic.service.  
    Pulling autoheal... done  
    Pulling nginx... done  
    Pulling mongodb... done  
    Pulling neo4j... done  
    Pulling neo4cape-service... done  
    Pulling neo4cape-ui-server ... done  
    Pulling neo4cape-ui... done  
    Pulling postgres... done  
    Pulling fusionauth... done  
    
    codelogic.service not started, configuration is needed.  
    Run sudo /opt/codelogic/pre_start_codelogic.sh to configure your system now.
    
    • Run the Configure Script
    • Run the following command:
      sudo /opt/codelogic/pre_start_codelogic.sh
      
      The script will confirm the protocol (http or https), hostname or IP address, and create a self-signed certificate for testing purposes.
    • If a signed certificate is available now, answer N to the Allow HTTP? question.

    Note

    A self-signed certificate will be created regardless of the answer. The answer to this question determines the protocol (http or https) used for the software repository.

    For example, if http://myserver.com is entered, the package repositories will use http. If https://myserver.com is entered, the package repositories will use https.

    See Install a signed TLS certificate on the server below for more information.

    • Create a CodeLogic Administrator Account with an email address and password.

    Note

    The password must be between 8 and 256 characters in length (numbers, symbols, and mixed-case letters allowed).

  • Install a signed TLS certificate on the server

    • The signed TLS certificate and key file names must be named codelogic.crt and codelogic.key.
    • Copy the signed TLS certificate and key to /opt/codelogic/certs/ and restart the CodeLogic Server.

    Important

    The certificate must be signed by a certificate authority. Although a self-signed certificate allows access to the GUI, the agents will not accept a self-signed certificate. For more information, see Using Internally Generated Certificates.

    The self-signed certificate created by pre_start_codelogic.sh may be used for product evaluation.

    sudo cp -p /path/to/signed/certificate.crt /opt/codelogic/certs/codelogic.crt  
    sudo cp -p /path/to/signed/certificate.key /opt/codelogic/certs/codelogic.key  
    sudo cp /path/to/your/root-or-intermediate-cert.crt /opt/codelogic/root_certs  
    sudo systemctl restart codelogic
    
    • Verify that the CodeLogic Server is Running
    • The server is controlled via standard Linux facilities. For example, to view the status, use the systemctl command. Root permission is not needed to view the status.
      systemctl status codelogic
      
    Sample Output
    $ systemctl status codelogic  
    ● codelogic.service - CodeLogic  
    Loaded: loaded (/lib/systemd/system/codelogic.service; enabled; vendor preset: enabled)  
    Active: active (exited) since Fri 2021-01-08 15:45:35 PST; 5h 25min ago  
    Docs: https://www.codelogic.com  
    https://info.codelogic.com/blog  
    Main PID: 1554 (code=exited, status=0/SUCCESS)  
    Tasks: 0 (limit: 19150)  
    Memory: 0B  
    CGroup: /system.slice/codelogic.service  
    
    Jan 08 15:46:01 ub20scratch docker-compose[1554]: Starting postgres ...  
    Jan 08 15:46:01 ub20scratch docker-compose[1554]: nginx is up-to-date  
    Jan 08 15:46:01 ub20scratch docker-compose[1554]: codelogic_autoheal_1 is up-to-date  
    Jan 08 15:46:01 ub20scratch docker-compose[1554]: mongodb is up-to-date  
    Jan 08 15:46:01 ub20scratch docker-compose[1554]: Starting neo4j...  
    Jan 08 15:46:06 ub20scratch docker-compose[1554]: [69B blob data]  
    Jan 08 15:46:08 ub20scratch docker-compose[1554]: [77B blob data]  
    Jan 08 15:46:09 ub20scratch docker-compose[1554]: [77B blob data]  
    Jan 08 15:46:14 ub20scratch docker-compose[1554]: [125B blob data]  
    Jan 08 15:46:18 ub20scratch docker-compose[1554]: [48B blob data]
    
    • Log in to the Server
    • Log in to the CodeLogic Server with the CodeLogic Administrator Account you created above.
    • If a signed TLS certificate has been copied to /opt/codelogic/certs, use https to log in the server using the default credentials.
    • If “y” was the response to the “Allow HTTP?” question, use http.
      URL (https): https://your_server/  
      URL (http):http://your_server/  
      Email:<email address>  
      Password:<password>
      

    Note

    You MUST replace your_server with the actual address of your CodeLogic Server.

    Note

    It may take 2-3 minutes after restarting CodeLogic before login is available.