Name: atlas
Owner: University of Colorado Boulder
Description: Website inventory and deployment agent for Web Express
Created: 2016-02-17 21:28:25.0
Updated: 2018-03-16 14:40:20.0
Pushed: 2018-04-02 19:24:23.0
Homepage: https://cuboulder.github.io/atlas/
Size: 2704
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Atlas is a RESTful API that interacts with servers to deploy and maintain Web Express at University of Colorado Boulder.
See Express_local for setting up a local development environment.
Configuration is split between various files config_*.py
. You need to create config_local.py
and config_servers.py
files.
If you are on anything other than a local development environment, you will also need to create a .mylogin.cnf
file to authenticate into MySQL (http://dev.mysql.com/doc/refman/5.7/en/mysql-config-editor.html). The naming convention is [database_user]_[environment]
.
Code items should be created first. Required fields are: git URL, commit hash, Name, Version, and Type (core, profile, module, theme, library). Optional fields are: is_current (allows you to indicate the preferred version of a code item) and a tagging field.
Site items are created with a 'pending' status and can be assigned a specific core and/or profile when created. If a core or profile is not specified, the 'current' version of the default is used.
Currently we use a git pull
deployment. When code is changed, you need to restart Celery, Celerybeat and Apache.
Celery Flower is available via to command line to inspect tasks.
ta/environments/atlas/bin/celery -A celery flower --conf=path/to/atlas/config_flower.py
Celery will return a url in the first part of a long response.
70118 22:33:35 command:136] Visit me at http://[YOUR-URL]:5555
Pull requests are always welcome. Project is under active development. We are committed to keeping the Express Drupal install profile and Atlas independent of each other.
The safest option is always to use POST to create a new item and then to PATCH the site over.
name
is an end user facing field that should describe the command.command
is the string that is run on the server(s). Commands do not support prompts and should exit with a 0
exit code, this means end drush commands like drush en [module_name] -y
with -y
.query
appended to ?where
in a call to the Atlas API. Special characters, including all symbols, need to be unicode encoded (Unicode Character table).single_server
is useful for commands that affect only the database layer like module enable or Drupal cache clear.clear_apc
import_code
correct_file_permissions
update_settings_file
update_homepage_extra_files
-i -v -X POST -d '{"git_url": "git@github.com:CuBoulder/drupal-7.x.git", "commit_hash": "9ee4a1a2fa3bedb3852d21f2198509c107c48890", "meta":{"version": "7.42", "code_type": "core", "name": "drupal", "is_current": true}}' -H 'Content-Type: application/json' -u 'USERNAME:PASSWORD' https://inventory.local/atlas/code
-i -v -X POST -d '{"git_url": "git@github.com:CuBoulder/express.git", "commit_hash": "5f1fb979cacff22d6641da3c413696d02f9cc5f5", "meta":{"version": "2.2.5", "code_type": "profile", "name": "express", "is_current": true}}' -H 'Content-Type: application/json' -u 'USERNAME:PASSWORD' https://inventory.local/atlas/code
-i -v -X POST -d '{"status": "pending"}' -H 'Content-Type: application/json' -u 'USERNAME:PASSWORD' https://inventory.local/atlas/sites
-i -v -X PATCH -d '{"status": "installed"}' -H "If-Match: 4173813fc614292febc79241a8b677266cbed826" -H 'Content-Type: application/json' -u 'USERNAME:PASSWORD' https://inventory.local/atlas/sites/579b8f9a89b0dc0d7d7ce090
-i -v -X PATCH -d '{"code": {"profile": "57adffc389b0dc1631822bce"}}' -H "If-Match: b8c1942d0238559ca9c3333626777ec7ce97f955" -H 'Content-Type: application/json' -u 'USERNAME:PASSWORD' https://inventory.local/atlas/sites/57adff1389b0dc1613d0f948
-i -v -X DELETE -H "If-Match: 5b3bc91045cca9fdc9a8b50bfb4095ecceb2dcbe" -H 'Content-Type: application/json' -u 'USERNAME:PASSWORD' https://inventory.local/atlas/sites/57adfdb789b0dc1612c23a90