-
Notifications
You must be signed in to change notification settings - Fork 2
Install Procedures
Install procedures
- Create an ansible user on all boxes, select a head node, generate ssh key, distribute public keys, needs sudo on all boxes
- on ansible head node clone de-ansible into the ansible home dir
- X?in your cloned de-ansible repo, install ansible requirements: $ ansible-galaxy install --force -r requirements.yaml
- create an ansible-vars dir under the ansible home dir to contain platform specific configs and inventories
- X?install python prereqs on all boxes: $ yum install curl python-httplib2 python-simplejson (update: including this in bootstrap.yaml, see next command)
- X?install prereqs: $ ansible-playbook -i inventory -e @group_vars -s -K bootstrap.yaml
- Xinstall docker, etc.: $ ansible-playbook -i inventory -e @group_vars -s -K provision-services-host.yml
- Xinstall java on services VM: $ ansible-playbook -i inventory -e @group_vars -s -K provision-java.yaml
- Xinstall timezone packages: $ ansible-playbook -i inventory -e @group_vars -s -K timezone.yaml
- Xinstall condor work in progress, see here though Don has a somewhat functional playbook: $ ansible-playbook -i inventory -e @group_vars -s -K condor.yaml
- Xverify cleared for launch: $ ansible-playbook -i inventory -e @group_vars -s -K verify-PRE_DEPLOY.yaml
- run new prereqs: $ ansible-playbook -i inventory -e @group_vars -s -K playbooks/prereqs.yaml
- pull the trigger: $ ansible-playbook -i inventory -e @group_vars -s -K deploy-prod.yaml
- install and configure cas using our dfc-cas-overlay
- install postgres databases note that this is optional, the iplant deploy-services will alternately be able to configure these databases:
$ yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-2.noarch.rpm
- add group vars and inventories
- underneath ansible-vars add inventory.yaml and vars.yaml
Locations for database tars(from group vars):
db_targz: https://everdene.iplantcollaborative.org/jenkins/job/databases-dev/lastSuccessfulBuild/artifact/databases/de-database-schema/database.tar.gz
jexdb_targz: https://everdene.iplantcollaborative.org/jenkins/job/databases-dev/lastSuccessfulBuild/artifact/databases/jex-db/jex-db.tar.gz
metadata_db_targz: https://everdene.iplantcollaborative.org/jenkins/job/databases-dev/lastSuccessfulBuild/artifact/databases/metadata/metadata-db.tar.gz
notification_db_targz: https://everdene.iplantcollaborative.org/jenkins/job/databases-dev/lastSuccessfulBuild/artifact/databases/notification-db/notification-db.tar.gz
See also https://everdene.iplantcollaborative.org/jenkins/job/databases-dev/
facepalm commands to run:
based on template
java -jar /tmp/facepalm-standalone.jar -m {{fmode}} {{db_version_flag|default('')}} -h {{curr_db_host}} -p {{curr_db_port}} -d {{curr_db_name}} -U {{curr_db_user}} -A {{curr_db_admin}} {{tgz_flag}}
de db
java -jar target/facepalm-standalone.jar -m init -h dfc-test-vmlab3.edc.renci.org -p 5432 -d de -U de -A postgres database.tar.gz
jex db
java -jar target/facepalm-standalone.jar -m init -h dfc-test-vmlab3.edc.renci.org -p 5432 -d jex -U jex_user -A postgres jex-db.tar.gz
metadata db
java -jar target/facepalm-standalone.jar -m init -h dfc-test-vmlab3.edc.renci.org -p 5432 -d metadata -U metadata_db -A postgres metadata-db.tar.gz
notification db
java -jar target/facepalm-standalone.jar -m init -h dfc-test-vmlab3.edc.renci.org -p 5432 -d notifications -U notification_user -A postgres notification-db.tar.gz
Data container work is in a private repo, which we need to formalize (mc), in the meantime, we build our own data container docker image and serve it out of a private docker registry, per this nice setup instructions
Edit the generate_configs.sh to point to the correct location for variables and inventory files. This will generate a set of .properties files for each service, typically in the /etc/iplant/de directory like this:
[ansible@dfc-test-vmlab1 de]$ ls
anon-files.properties data-info.properties info-typer.properties jex.properties notificationagent.properties user-preferences.properties
apps.properties dewey.properties iplant-email.properties kifshare.properties saved-searches.properties user-sessions.properties
clockwork.properties exim-sender.properties iplant-groups.properties metadata.properties terrain.properties
condor-log-monitor.properties infosquito.properties jexevents.properties monkey.properties tree-urls.properties
Run the ansible playbook generate-configs.yaml to create the consolidated set of properties and configuration that is to be used in the next step to create the config docker images for each service.
ansible-playbook -i /home/ansible/ansible-vars/inventory -e @/home/ansible/ansible-vars/group_vars.yaml -s -K -vvvv playbooks/generate-configs.yaml
Then run local services config
ansible-playbook -i /home/ansible/ansible-vars/inventory -e @/home/ansible/ansible-vars/group_vars.yaml -s -vvvv playbooks/local-services-cfg.yml --extra-vars="group=ansible owner=ansible"
This generates additional configuration information under /etc (e.g. docker-gc/)
Once the configs are in place, run the build_config_images.sh to copy the configs into a docker image and push it to a private docker repo.
To set up a private repo consult this link: https://docs.docker.com/registry/deploying/
The script may need to be configured for your particular Docker repo