Amadis

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

The SAM Backend installation uses the Docker technology. There are two installation paths:

  • Production, staging and test environments referred as Production Environment below.

  • Development environment

The target environment of the SAM Backend is Ubuntu Server 18.04 or 20.04.

Its private docker repository is located at dev.atheos.ca:5000. A user and password is required to gain access to the repository.

Table of contents

New installation of a Production Environment

The supplementary packages usage are:

  • gnupg2 : GNU privacy guard - a free PGP replacement

  • pass : lightweight directory-based password manager

  • make : To be able to use the provided tool (Makefile) to install the SAM Backend

  1. sudo apt install -y docker.io docker-compose gnupg2 pass make

  2. Retrieve the Dockers/SAMDeployment directory from the development project located at svn://svn.agnos.ca:3890/abc/Products/SamBackEnd/trunk into the environment where it will be installed.

  3. make the SAMDeployment directory current.

  4. Edit the Configuration.conf file. Set the parameters accordingly to your environment.

  5. Replace the certificate (fullchain.pem) and the private key (privkey.pem) in the Server/resources directory with your own.

  6. You must replace the APP_KEY in the Server/templates/laravel_env file. You can generate a new one using the following command:

    echo "base64:`dd if=/dev/random bs=32 count=1 | base64`"

    You can also generate a new one from the /var/www/html directory in the SAM backend container by running the command

    php artisan key:generate
  7. docker login dev.atheos.ca:5000

  8. Initialize the permanent storage

    make initstorage
  9. Initialize the database

  10. make initdatabase
  11. Create the images

    make images 
  12. Launch the SAM backend by issuing the following command.

    make run
  13. Optionally, install phpmyadmin for debugging purposes. It is not recommended. Customize the files fullchain.pem, passwd and privkey.pem in the resources directory. passwd is created with htpasswd. It contains the Apache2 passwords. Launch it by issuing the following commands:

    cd PhpMyAdmin 
    make images
    make run

Update of an existing Production installation

  1. Preserve the file Configuration.conf from the previous SAMDeployment package.

  2. Preserve APP_KEY value from the .env file in the Server Docker. If needed, update SAMDeployment/Server/templates/laravel_env. The value of APP_KEY must be preserved. If lost, you SAM backend environment will have many issues.

  3. Stop the containers samserver_xx.yy.zz, samphpmyadmin_xx.yy.zz and samdatabase_xx.yy.zz

  4. Make a backup of your storage structure set using the Configuration.conf variable STORAGE_BASE_DIRECTORY

  5. Make sure you use the latest version of SAMDeployment

  6. Bump up the version number in the Configuration.conf file

  7. Update Configuration.conf matching the corresponding parameters from your previous one.

  8. Fill in any new configuration parameters.

  9. run make images

  10. run make run

  11. The container databaseupdate has a very short life span. It terminates as soon as the database is updated.

  • No labels