Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ec2 configs. #3409

Merged
merged 1 commit into from
Jun 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 9 additions & 5 deletions deployment/terraform/modules/ec2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,14 @@ set -x
export PROJECT_ROOT=/srv/refinery-platform

# install dependencies
/usr/bin/apt-get clean
/usr/bin/wget -q -P /var/cache/apt/archives https://apt.puppetlabs.com/puppet5-release-xenial.deb
/usr/bin/dpkg -i /var/cache/apt/archives/puppet5-release-xenial.deb
/usr/bin/apt-get -qq update
/usr/bin/apt-get -qq -y install git htop jq nmon puppet-agent ruby-dev tree
/usr/bin/apt-get -y autoremove
/usr/bin/apt-get -qq -y install git htop jq nmon puppet ruby-dev tree
/usr/bin/apt-get clean

PATH=/opt/puppetlabs/bin:$PATH

# add extra SSH keys from Github
for USERNAME in ${join(" ", var.ssh_users)}; do
Expand All @@ -173,11 +177,11 @@ su -c "git clone https://github.com/refinery-platform/refinery-platform.git $PRO
su -c "cd $PROJECT_ROOT && /usr/bin/git checkout -q ${var.git_commit}" ubuntu

# configure librarian-puppet
/usr/bin/gem install librarian-puppet -v 2.2.3 --no-rdoc --no-ri
/usr/bin/gem install librarian-puppet -v 3.0.0 --no-rdoc --no-ri
cd $PROJECT_ROOT/deployment/puppet
# need to set $HOME: https://github.com/rodjek/librarian-puppet/issues/258
export HOME=/root
/usr/local/bin/librarian-puppet config path /usr/share/puppet/modules --local
/usr/local/bin/librarian-puppet config path /opt/puppetlabs/puppet/modules --local
/usr/local/bin/librarian-puppet config tmp /tmp --local
/usr/local/bin/librarian-puppet install

Expand Down Expand Up @@ -213,7 +217,7 @@ export FACTER_REFINERY_WELCOME_EMAIL_MESSAGE="${var.refinery_welcome_email_messa
export FACTER_USER_FILES_COLUMNS="${var.refinery_user_files_columns}"

# run Puppet
/usr/bin/puppet apply $PROJECT_ROOT/deployment/puppet/manifests/site.pp
/opt/puppetlabs/bin/puppet apply $PROJECT_ROOT/deployment/puppet/manifests/site.pp
EOF
}

Expand Down