Table of contents
Foreword
Before running the installation sequence, one needs to update the installation scripts to:
Adjust some of the paths
Set personnal administor credentials and default database content
Docker repository access
SAMDistImages/Configuration.conf
Make sure IMAGE_SOURCE_REPOSITORY points to “localhost” and to a directory of your choice. For example:
IMAGE_SOURCE_REPOSITORY=localhost:5000/sambackend/distimages
If you started Docker on a different port than 5000 (see Local Docker repository paragraph) then you will need to change the port number targeted in IMAGE_SOURCE_REPOSITORY.
SAMDeployment/Configuration.conf
Make sure IMAGE_SOURCE_REPOSITORY and IMAGE_DEPLOYMENT_REPOSITORY point to “localhost” and to a directory of your choice. For example:
IMAGE_SOURCE_REPOSITORY=localhost:5000/sambackend/distimages IMAGE_DEPLOYMENT_REPOSITORY=localhost:5000/sambackend/demoimages
If you started Docker on a different port than 5000 (see Local Docker repository paragraph) then you will need to change the port number targeted in IMAGE_SOURCE_REPOSITORY.
Then, customize your actual repository location by modifying STORAGE_BASE_DIRECTORY. For example:
STORAGE_BASE_DIRECTORY=/home/<username>/Downloads/backend/v01.00.06b/Storage
Database access
All the parameters from SAMDeployment/Configuration.conf file can be changed to your liking, especially the DATABASE_USER, DATABASE_PASSWORD and ROOT_DATABASE_PASSWORD fields which should absolutely NOT de the default values in production.
Certificates
Replace the certificate (fullchain.pem) and the private key (privkey.pem) in SAMDeployment/Server/resources/ by your own.
Application key
You must replace the APP_KEY in the SAMDeployment/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`"
docker login dev.atheos.ca:5000
Initialize the permanent storage
make initstorage
Initialize the database
make initdatabase
Create the images
make images
Launch the SAM backend by issuing the following command.
make run
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
Preserve the file Configuration.conf from the previous SAMDeployment package.
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.
Stop the containers samserver_xx.yy.zz, samphpmyadmin_xx.yy.zz and samdatabase_xx.yy.zz
Make a backup of your storage structure set using the Configuration.conf variable STORAGE_BASE_DIRECTORY
Make sure you use the latest version of SAMDeployment
Bump up the version number in the Configuration.conf file
Update Configuration.conf matching the corresponding parameters from your previous one.
Fill in any new configuration parameters.
run make images
run make run
The container databaseupdate has a very short life span. It terminates as soon as the database is updated.