Created
November 7, 2014 10:21
-
-
Save dblooman/ebd96af05e3aee9e807a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo 'javelin: RVM install;' | |
| source /etc/profile.d/rvm.sh | |
| echo 'javelin: RVM use 2.0.0-p353;' | |
| rvm use 2.0.0-p353 | |
| container_name=<%= @name %> | |
| echo 'javelin: configuring sandbox specific start up files to set environment variables;' | |
| sed -i "s/fuzzy_duck/${container_name}/g" /etc/bbc/profile.d/sandbox.conf | |
| sed -i "s/\.int\./<%= @url_server_env %>/g" /etc/bbc/profile.d/sandbox.conf | |
| echo 'javelin: ready to checkout branches and provision projects;' | |
| for file in /${container_name}/projects/*.sh | |
| do | |
| sh $file 2>&1 | |
| done | |
| echo 'javelin: adding hostnames to /etc/hosts;' | |
| echo "127.0.0.1 m.<%=@name%>.sport-javelin<%=@url_server_env%>cloud.bbc.co.uk pal.<%=@name%>.sport-javelin<%=@url_server_env%>cloud.bbc.co.uk pal.<%=@name%>.sport-javelin<%=@url_server_env%>cloud.bbc.co.uk static.<%=@name%>.sport-javelin<%=@url_server_env%>cloud.bbc.co.uk ichef.<%=@name%>.sport-javelin<%=@url_server_env%>cloud.bbc.co.uk <%=@name%>.sandbox.bbc.co.uk" >> /etc/hosts | |
| echo 'javelin: copying certs;' | |
| <% if @app_config['cert_location'].end_with? '.pem' %> | |
| cp <%= @app_config['cert_location'] %> /etc/pki/certificate.pem | |
| <% else %> | |
| openssl pkcs12 -in <%= @app_config['cert_location'] %> -out /etc/pki/certificate.pem -clcerts -nodes -passin pass:client | |
| <% end %> | |
| echo 'javelin: httpd start;' | |
| service httpd restart | |
| echo 'javelin: memcached start;' | |
| service memcached restart | |
| echo "javelin: ${container_name} is all ready to go! Get it whilst it's hot!;" | |
| tail -f /var/log/httpd/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment