Skip to content

Downtime Procedures

Carrie Arnold edited this page Oct 28, 2016 · 1 revision

Portal Downtime/Emergency Procedures

This document describes the running state of the Chameleon User Portal and what to do in the case of a downtime or emergency.

Process

The Chameleon User Portal runs as a Docker Composition. The Docker image for the portal is mrhanlon/chameleon_portal:release, available from the Docker image repository or by building the release branch of the portal repo: https://github.com/ChameleonCloud/portal.

The portal application runs under the portal user. From /opt/chameleon run:

    [portal@chameleon06 chameleon]$ docker-compose up -d
    Recreating chameleon_referenceapi_1...
    Recreating chameleon_portal_1...

The status of the process can be checked with:

[portal@chameleon06 chameleon]$ docker-compose ps
          Name                        Command               State                    Ports
------------------------------------------------------------------------------------------------------------
chameleon_portal_1         supervisord -n                   Up      0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
chameleon_referenceapi_1   sh -c service mysql start; ...   Up      22/tcp, 0.0.0.0:8000->8000/tcp
[portal@chameleon06 chameleon]$

Restarting the process

If the process needs to be restarted, you can stop and restart the docker composition:

[portal@chameleon06 chameleon]$ docker-compose stop
Stopping chameleon_portal_1...
Stopping chameleon_referenceapi_1...
[portal@chameleon06 chameleon]$ docker-compose up -d
Recreating chameleon_referenceapi_1...
Recreating chameleon_portal_1...

Logs

Portal logs are in /opt/chameleon/logs. The nginx webserver logs are in /opt/chameleon/logs/nginx and the Django application logs are in /opt/chameleon/logs/django. Authentication-related logs can be specifically found in /opt/chameleon/logs/django/chameleon_auth.log.

Building a new host

In the case that a new host must be built due to the portal host running the application is corrupted, you need to setup:

  • CentOS 7+ Host
  • Install Docker 1.6.x+.
  • Place TLS Certificates (Stache) at /opt/chameleon/certs/certsX.
  • Sync /opt/chameleon/media directory. The Django media is backed up on Ranch at /home/01356/mrhanlon/chameleon/media.
  • Start the docker process (see above.)

Certificates

The Chameleon TLS certificates should be configured for Nginx. There are three sets of certs for Chameleon:

The certs[0-2] directories should have two files in them: bundle.crt and site.key. The bundle.crt file should be the concatenation of the Public Key followed by the Certificate Chain, in PEM format. The site.key should be the Private Key.