Skip to content

Instantly share code, notes, and snippets.

@mark-dce
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mark-dce/21c75452a8337e93a245 to your computer and use it in GitHub Desktop.
Save mark-dce/21c75452a8337e93a245 to your computer and use it in GitHub Desktop.
Ansible Run
MARKs-MB:sufia-centos mark$ git pull
remote: Counting objects: 53, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 53 (delta 17), reused 4 (delta 4), pack-reused 26
Unpacking objects: 100% (53/53), done.
From https://github.com/acozine/sufia-centos
* [new branch] java8 -> origin/java8
deaccf5..0837488 master -> origin/master
Already up-to-date.
MARKs-MB:sufia-centos mark$ git checkout java8
Branch java8 set up to track remote branch java8 from origin.
Switched to a new branch 'java8'
MARKs-MB:sufia-centos mark$ mate .
MARKs-MB:sufia-centos mark$ ssh centos@172.16.243.137
Last login: Thu Aug 13 02:10:17 2015
[centos@hydra ~]$ exit
logout
Connection to 172.16.243.137 closed.
## was confirming ip for vmware box and adding it to sufia-centos/hosts
MARKs-MB:sufia-centos mark$ ansible-playbook vanilla.yml
PLAY [provision vanilla centos 7 host via ssh] ********************************
GATHERING FACTS ***************************************************************
ok: [hydra-head]
TASK: [generic-centos | format volume for /opt] *******************************
ok: [hydra-head]
TASK: [generic-centos | mount volume at /opt] *********************************
ok: [hydra-head]
TASK: [housekeeping | disable SELinux] ****************************************
ok: [hydra-head]
TASK: [housekeeping | update all yum packages] ********************************
changed: [hydra-head]
TASK: [housekeeping | install dev tools and libraries] ************************
ok: [hydra-head] => (item=autoconf,automake,binutils,bison,flex,gcc,gcc-c++,gettext,libtool,make,patch,pkgconfig,redhat-rpm-config,rpm-build,rpm-sign,screen,wget,curl-devel,httpd-devel,openssl-devel,readline-devel,sqlite-devel,mysql-devel,ImageMagick-devel,nasm,libxml2-devel,libxslt-devel,libyaml-devel,libffi-devel,gdbm-devel,git,xfsprogs)
TASK: [housekeeping | create install group] ***********************************
ok: [hydra-head]
TASK: [housekeeping | create install user] ************************************
ok: [hydra-head]
TASK: [housekeeping | chown /opt] *********************************************
ok: [hydra-head]
TASK: [housekeeping | create install directory] *******************************
ok: [hydra-head]
TASK: [housekeeping | create cap group] ***************************************
ok: [hydra-head]
TASK: [housekeeping | create cap user] ****************************************
ok: [hydra-head]
TASK: [housekeeping | create cap directories] *********************************
ok: [hydra-head] => (item=/opt/sufia-project/shared/config/initializers)
ok: [hydra-head] => (item=/opt/sufia-project/shared/log)
ok: [hydra-head] => (item=/opt/sufia-project/releases)
ok: [hydra-head] => (item=/home/deploy/.ssh)
TASK: [housekeeping | add keys for capistrano user] ***************************
ok: [hydra-head] => (item=https://github.com/acozine.keys)
TASK: [ruby | remove package ruby] ********************************************
ok: [hydra-head]
TASK: [ruby | download ruby] **************************************************
ok: [hydra-head]
TASK: [ruby | unzip ruby file] ************************************************
ok: [hydra-head]
TASK: [ruby | check if ruby is installed] *************************************
ok: [hydra-head]
TASK: [ruby | configure ruby] *************************************************
ok: [hydra-head]
TASK: [ruby | make ruby] ******************************************************
skipping: [hydra-head]
TASK: [ruby | install ruby] ***************************************************
skipping: [hydra-head]
TASK: [ruby | symlink ruby for root] ******************************************
ok: [hydra-head]
TASK: [ruby | symlink gem for root] *******************************************
ok: [hydra-head]
TASK: [ruby | install bundler] ************************************************
ok: [hydra-head]
TASK: [hydra-stack | install JDK 1.8] *****************************************
fatal: [hydra-head] => input file not found at /Users/mark/Documents/workspace/_no_backup/deployinghydra/sufia-centos/roles/hydra-stack/files/jdk-8u51-linux-x64.tar.gz or /Users/mark/Documents/workspace/_no_backup/deployinghydra/sufia-centos/jdk-8u51-linux-x64.tar.gz
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/mark/vanilla.retry
hydra-head : ok=22 changed=1 unreachable=1 failed=0
MARKs-MB:sufia-centos mark$ wget http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz
--2015-08-12 21:49:42-- http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz
Resolving download.oracle.com... 216.17.28.10, 216.17.28.8
Connecting to download.oracle.com|216.17.28.10|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz [following]
--2015-08-12 21:49:42-- https://edelivery.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz
Resolving edelivery.oracle.com... 23.194.22.140
Connecting to edelivery.oracle.com|23.194.22.140|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2015-08-12 21:49:42-- http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com|216.17.28.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5307 (5.2K) [text/html]
Saving to: 'jdk-8u51-linux-x64.tar.gz'
100%[======================================>] 5,307 --.-K/s in 0s
2015-08-12 21:49:42 (19.3 MB/s) - 'jdk-8u51-linux-x64.tar.gz' saved [5307/5307]
MARKs-MB:sufia-centos mark$ ls
README.md roles
adrl-vagrant.yml sample_Vagrantfile
ansible.cfg sample_sub_playbook.yml
ec2.yml vagrant.yml
hosts vanilla.yml
jdk-8u51-linux-x64.tar.gz
MARKs-MB:sufia-centos mark$ ls -la
total 88
drwxr-xr-x+ 14 mark staff 476 Aug 12 21:49 .
drwxr-xr-x+ 15 mark staff 510 Aug 4 10:46 ..
drwxr-xr-x+ 16 mark staff 544 Aug 12 21:08 .git
-rw-r--r--@ 1 mark staff 2257 Aug 5 10:40 README.md
-rw-r--r--+ 1 mark staff 334 Aug 12 21:08 adrl-vagrant.yml
-rw-r--r--@ 1 mark staff 262 Aug 5 10:40 ansible.cfg
-rw-r--r--@ 1 mark staff 483 Aug 4 10:46 ec2.yml
-rw-r--r--@ 1 mark staff 254 Aug 5 09:34 hosts
-rw-r--r--+ 1 mark staff 5307 Mar 20 2012 jdk-8u51-linux-x64.tar.gz
drwxr-xr-x+ 13 mark staff 442 Aug 5 09:34 roles
-rw-r--r--+ 1 mark staff 1855 Aug 4 10:46 sample_Vagrantfile
-rw-r--r--+ 1 mark staff 115 Aug 4 10:46 sample_sub_playbook.yml
-rw-r--r--@ 1 mark staff 309 Aug 4 10:46 vagrant.yml
-rw-r--r--@ 1 mark staff 357 Aug 12 21:09 vanilla.yml
MARKs-MB:sufia-centos mark$ mv ~/Downloads/jdk-8u51-linux-x64.tar jdk-8u51-linux-x64.tar.gz
MARKs-MB:sufia-centos mark$ ansible-playbook vanilla.yml --limit @/Users/mark/vanilla.retry
PLAY [provision vanilla centos 7 host via ssh] ********************************
GATHERING FACTS ***************************************************************
ok: [hydra-head]
TASK: [generic-centos | format volume for /opt] *******************************
ok: [hydra-head]
TASK: [generic-centos | mount volume at /opt] *********************************
ok: [hydra-head]
TASK: [housekeeping | disable SELinux] ****************************************
ok: [hydra-head]
TASK: [housekeeping | update all yum packages] ********************************
ok: [hydra-head]
TASK: [housekeeping | install dev tools and libraries] ************************
ok: [hydra-head] => (item=autoconf,automake,binutils,bison,flex,gcc,gcc-c++,gettext,libtool,make,patch,pkgconfig,redhat-rpm-config,rpm-build,rpm-sign,screen,wget,curl-devel,httpd-devel,openssl-devel,readline-devel,sqlite-devel,mysql-devel,ImageMagick-devel,nasm,libxml2-devel,libxslt-devel,libyaml-devel,libffi-devel,gdbm-devel,git,xfsprogs)
TASK: [housekeeping | create install group] ***********************************
ok: [hydra-head]
TASK: [housekeeping | create install user] ************************************
ok: [hydra-head]
TASK: [housekeeping | chown /opt] *********************************************
ok: [hydra-head]
TASK: [housekeeping | create install directory] *******************************
ok: [hydra-head]
TASK: [housekeeping | create cap group] ***************************************
ok: [hydra-head]
TASK: [housekeeping | create cap user] ****************************************
ok: [hydra-head]
TASK: [housekeeping | create cap directories] *********************************
ok: [hydra-head] => (item=/opt/sufia-project/shared/config/initializers)
ok: [hydra-head] => (item=/opt/sufia-project/shared/log)
ok: [hydra-head] => (item=/opt/sufia-project/releases)
ok: [hydra-head] => (item=/home/deploy/.ssh)
TASK: [housekeeping | add keys for capistrano user] ***************************
ok: [hydra-head] => (item=https://github.com/acozine.keys)
TASK: [ruby | remove package ruby] ********************************************
ok: [hydra-head]
TASK: [ruby | download ruby] **************************************************
ok: [hydra-head]
TASK: [ruby | unzip ruby file] ************************************************
ok: [hydra-head]
TASK: [ruby | check if ruby is installed] *************************************
ok: [hydra-head]
TASK: [ruby | configure ruby] *************************************************
ok: [hydra-head]
TASK: [ruby | make ruby] ******************************************************
skipping: [hydra-head]
TASK: [ruby | install ruby] ***************************************************
skipping: [hydra-head]
TASK: [ruby | symlink ruby for root] ******************************************
ok: [hydra-head]
TASK: [ruby | symlink gem for root] *******************************************
ok: [hydra-head]
TASK: [ruby | install bundler] ************************************************
ok: [hydra-head]
TASK: [hydra-stack | install JDK 1.8] *****************************************
changed: [hydra-head]
TASK: [hydra-stack | untar java 8] ********************************************
changed: [hydra-head]
TASK: [hydra-stack | install java 8 as first alternative] *********************
changed: [hydra-head] => (item=java)
changed: [hydra-head] => (item=jar)
changed: [hydra-head] => (item=javac)
TASK: [hydra-stack | install tomcat packages] *********************************
ok: [hydra-head] => (item=tomcat,tomcat-webapps,tomcat-admin-webapps)
TASK: [hydra-stack | set tomcat to restart on reboot] *************************
ok: [hydra-head]
TASK: [hydra-stack | create velocity log] *************************************
changed: [hydra-head]
TASK: [hydra-stack | symlink velocity log] ************************************
ok: [hydra-head]
TASK: [hydra-stack | download solr tarball] ***********************************
ok: [hydra-head]
TASK: [hydra-stack | untar solr tarball] **************************************
ok: [hydra-head]
TASK: [hydra-stack | check solr dir] ******************************************
ok: [hydra-head]
TASK: [hydra-stack | make solr lib dir] ***************************************
skipping: [hydra-head]
TASK: [hydra-stack | copy over war file] **************************************
changed: [hydra-head]
TASK: [hydra-stack | copy over dist jars] *************************************
changed: [hydra-head]
TASK: [hydra-stack | copy over contrib dir] ***********************************
changed: [hydra-head]
TASK: [hydra-stack | copy over example collection] ****************************
changed: [hydra-head]
TASK: [hydra-stack | copy logging jars] ***************************************
changed: [hydra-head]
TASK: [hydra-stack | set ownership and group for solr] ************************
changed: [hydra-head]
TASK: [hydra-stack | copy log4j properties file] ******************************
changed: [hydra-head]
TASK: [hydra-stack | set ownership and group for tomcat] **********************
changed: [hydra-head]
TASK: [hydra-stack | create solr xml file] ************************************
ok: [hydra-head]
TASK: [hydra-stack | symlink solr xml file to tomcat] *************************
ok: [hydra-head]
TASK: [hydra-stack | symlink schema from code to solr] ************************
changed: [hydra-head]
TASK: [hydra-stack | symlink solrconfig from code to solr] ********************
changed: [hydra-head]
TASK: [hydra-stack | download fedora] *****************************************
changed: [hydra-head]
TASK: [hydra-stack | make fedora data dir] ************************************
ok: [hydra-head]
TASK: [hydra-stack | check fedora.war] ****************************************
ok: [hydra-head]
TASK: [hydra-stack | copy over fedora.war] ************************************
skipping: [hydra-head]
TASK: [hydra-stack | create tomcat config and java options] *******************
ok: [hydra-head]
TASK: [hydra-stack | restart tomcat] ******************************************
changed: [hydra-head]
TASK: [hydra-stack | create shared fedora and solr configs] *******************
ok: [hydra-head] => (item=fedora.yml)
ok: [hydra-head] => (item=solr.yml)
ok: [hydra-head] => (item=blacklight.yml)
TASK: [services | install zip utility] ****************************************
ok: [hydra-head]
TASK: [services | download fits zip] ******************************************
ok: [hydra-head]
TASK: [services | unpack fits] ************************************************
ok: [hydra-head]
TASK: [services | make fits executable] ***************************************
ok: [hydra-head]
TASK: [services | copy fits] **************************************************
changed: [hydra-head]
TASK: [services | symlink fits] ***********************************************
ok: [hydra-head]
TASK: [services | enable epel repo] *******************************************
ok: [hydra-head]
TASK: [services | install redis] **********************************************
ok: [hydra-head] => (item=redis,php-pecl-redis)
TASK: [services | run redis] **************************************************
changed: [hydra-head]
TASK: [services | copy resque init script] ************************************
ok: [hydra-head]
TASK: [services | start resque] ***********************************************
ok: [hydra-head]
TASK: [services | enable epel repo] *******************************************
ok: [hydra-head]
TASK: [services | install psycopg2] *******************************************
ok: [hydra-head]
TASK: [services | install postgresql packages] ********************************
ok: [hydra-head] => (item=postgresql,postgresql-devel,postgresql-server,postgresql-contrib,postgresql-libs,postgresql-python)
TASK: [services | create pg_backups directory] ********************************
ok: [hydra-head]
TASK: [services | add pg_backups script] **************************************
ok: [hydra-head]
TASK: [services | add pg_backups cron job] ************************************
ok: [hydra-head]
TASK: [services | create shared config files] *********************************
ok: [hydra-head] => (item=database.yml)
ok: [hydra-head] => (item=redis.yml)
ok: [hydra-head] => (item=resque-pool.yml)
ok: [hydra-head] => (item=secrets.yml)
TASK: [passenger | install passenger gem] *************************************
ok: [hydra-head]
TASK: [passenger | symlink passenger utilities for root user] *****************
ok: [hydra-head] => (item=passenger)
ok: [hydra-head] => (item=passenger-config)
ok: [hydra-head] => (item=passenger-install-apache2-module)
ok: [hydra-head] => (item=passenger-install-nginx-module)
ok: [hydra-head] => (item=passenger-memory-stats)
ok: [hydra-head] => (item=passenger-status)
TASK: [passenger | install passenger-install-apache2-module] ******************
ok: [hydra-head]
TASK: [passenger | generate passenger.conf file] ******************************
ok: [hydra-head]
TASK: [passenger | restart apache] ********************************************
changed: [hydra-head]
TASK: [marmotta | create pg marmotta database] ********************************
changed: [hydra-head]
TASK: [marmotta | add pg hydra user] ******************************************
changed: [hydra-head]
TASK: [marmotta | create marmotta group] **************************************
changed: [hydra-head]
TASK: [marmotta | create marmotta user] ***************************************
changed: [hydra-head]
TASK: [marmotta | download jetty] *********************************************
changed: [hydra-head]
TASK: [marmotta | untar jetty] ************************************************
changed: [hydra-head]
TASK: [marmotta | copy jetty contents to working directory] *******************
changed: [hydra-head]
TASK: [marmotta | download marmotta] ******************************************
changed: [hydra-head]
TASK: [marmotta | unzip marmotta] *********************************************
changed: [hydra-head]
TASK: [marmotta | copy marmotta] **********************************************
changed: [hydra-head]
TASK: [marmotta | set default variables for jetty] ****************************
changed: [hydra-head]
TASK: [marmotta | copy marmotta config files] *********************************
changed: [hydra-head] => (item=jetty.xml)
changed: [hydra-head] => (item=jetty-plus.xml)
changed: [hydra-head] => (item=marmotta-override-web.xml)
TASK: [marmotta | set marmotta system config properties] **********************
changed: [hydra-head]
TASK: [marmotta | create jetty init script] ***********************************
changed: [hydra-head]
TASK: [marmotta | copy marmotta file for jetty] *******************************
changed: [hydra-head]
TASK: [marmotta | symlink marmotta file to jetty] *****************************
changed: [hydra-head]
TASK: [marmotta | set permissions for marmotta directory] *********************
changed: [hydra-head]
TASK: [marmotta | create logs directory] **************************************
changed: [hydra-head]
TASK: [marmotta | set permissions for jetty directory] ************************
changed: [hydra-head]
TASK: [marmotta | start jetty and marmotta] ***********************************
changed: [hydra-head]
TASK: [app-config | update ssh config] ****************************************
changed: [hydra-head]
NOTIFIED: [app-config | restart ssh service] **********************************
changed: [hydra-head]
TASK: [app-config | add log rotation for production logs] *********************
changed: [hydra-head]
TASK: [app-config | add log rotation for catalina.out (tomcat/fedora/solr logs)] ***
changed: [hydra-head]
TASK: [app-config | create apache vhosts file] ********************************
changed: [hydra-head]
TASK: [app-config | add alex2 shared config files] ****************************
changed: [hydra-head] => (item=ezid.yml)
changed: [hydra-head] => (item=smtp.yml)
changed: [hydra-head] => (item=fedora.yml)
TASK: [app-config | add alex2 shared templates] *******************************
changed: [hydra-head]
TASK: [app-config | add config/environments directory] ************************
changed: [hydra-head]
TASK: [app-config | add shared config/environments/production.rb] *************
changed: [hydra-head]
PLAY RECAP ********************************************************************
hydra-head : ok=102 changed=48 unreachable=0 failed=0
MARKs-MB:sufia-centos mark$ ssh centos@172.16.243.137
Last login: Thu Aug 13 03:01:02 2015 from 172.16.243.1
[centos@hydra ~]$ ls /opt
fedora-data install jetty8 marmotta pg_backups solr sufia-project
[centos@hydra ~]$ ls -la /
total 64
dr-xr-xr-x. 18 root root 4096 Jul 30 19:30 .
dr-xr-xr-x. 18 root root 4096 Jul 30 19:30 ..
-rw-r--r-- 1 root root 0 Jul 30 19:30 .autorelabel
lrwxrwxrwx. 1 root root 7 Jul 31 00:25 bin -> usr/bin
dr-xr-xr-x. 4 root root 4096 Aug 4 11:09 boot
drwxr-xr-x 18 root root 3000 Aug 13 02:10 dev
drwxr-xr-x. 94 root root 4096 Aug 13 05:09 etc
drwxr-xr-x. 6 root root 4096 Jul 31 12:53 home
lrwxrwxrwx. 1 root root 7 Jul 31 00:25 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Jul 31 00:25 lib64 -> usr/lib64
drwx------. 2 root root 16384 Jul 30 19:25 lost+found
drwxr-xr-x. 2 root root 4096 Jun 10 2014 media
drwxr-xr-x. 2 root root 4096 Jun 10 2014 mnt
drwxr-xr-x 9 install install 114 Aug 13 02:59 opt
dr-xr-xr-x 422 root root 0 Aug 13 02:09 proc
dr-xr-x---. 5 root root 4096 Jul 31 16:12 root
drwxr-xr-x 27 root root 740 Aug 13 05:09 run
lrwxrwxrwx. 1 root root 8 Jul 31 00:25 sbin -> usr/sbin
drwxr-xr-x. 2 root root 4096 Jun 10 2014 srv
dr-xr-xr-x 13 root root 0 Aug 13 02:10 sys
drwxrwxrwt. 14 root root 4096 Aug 13 06:31 tmp
drwxr-xr-x. 13 root root 4096 Jul 31 00:25 usr
drwxr-xr-x. 21 root root 4096 Aug 13 02:10 var
[centos@hydra ~]$ chown centos:centos /opt
chown: changing ownership of ‘/opt’: Operation not permitted
[centos@hydra ~]$ sudo chown centos:centos /opt
[centos@hydra ~]$ Connection to 172.16.243.137 closed by remote host.
Connection to 172.16.243.137 closed.
MARKs-MB:sufia-centos mark$ git log
commit 32ba06d5462449c08e460506b91500c730926fd6
Author: Alicia Cozine <alicia@curationexperts.com>
Date: Thu Aug 6 19:03:14 2015 -0500
removes redundant java 8 install
commit 70847ba540303d8c7614a4f6819a1f2b1f60f459
Author: Alicia Cozine <alicia@curationexperts.com>
Date: Thu Aug 6 18:01:42 2015 -0500
fixes bug with ldap config
commit 11c25285d05b806e10bba78a3c94f2cf374a2a0f
Author: Alicia Cozine <alicia@curationexperts.com>
Date: Thu Aug 6 18:00:49 2015 -0500
adds an adrl-vagrant-specific playbook
commit 1a83b8f3f524083b94b9ea0da600f8665782297a
Author: Alicia Cozine <alicia@curationexperts.com>
Date: Thu Aug 6 17:59:08 2015 -0500
adds instructions for downloading Oracle Java tarball
MARKs-MB:sufia-centos mark$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment