From e464374ae6a4a992cd66b031c5df6f47a4476074 Mon Sep 17 00:00:00 2001 From: Maria Nita Date: Sat, 1 Nov 2014 16:24:53 +0100 Subject: [PATCH] Update provisioning, foregit hammer config and vagrant directories --- Vagrantfile | 2 ++ config/foregit.yml | 42 ++++++++++++++++++++++-------------------- install.sh | 15 +++++++++------ 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index e96d675..87ceb5b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -11,6 +11,8 @@ Vagrant.configure("2") do |config| # Share code config.vm.synced_folder(".", "/home/vagrant/foregit") + config.vm.synced_folder("../foreman", "/home/vagrant/foreman") + config.vm.synced_folder("../hammer-cli-foreman", "/home/vagrant/hammer-cli-foreman") config.vm.provider "virtualbox" do |v| diff --git a/config/foregit.yml b/config/foregit.yml index c103289..91ecea0 100644 --- a/config/foregit.yml +++ b/config/foregit.yml @@ -1,20 +1,22 @@ -api_url: 'http://api.foreman' -api_version: 2 -consumer_key: 'key' -consumer_secret: 'secret' -timeout: 2 -api_user: 'admin' -# An array of Foreman resources managed by Foregit -resources: :architectures -# Git repository path -repo_path: '/home/user/foregit/' -# The Git branch which should sync with Foreman -repo_branch: 'master' -# Remote address for repo, it should be SSH -repo_remote: 'git@github.com:myusername/foregit.git' -# Git configuration -git_username: 'myusername' -git_useremail: 'myusername@mail.org' -# A list of fields which should be removed from a Foreman resource before/after -# are synced within the instance and repo. -ignored_foreman_fields: ['created_at', 'updated_at', 'sp_name', 'sp_subnet_id'] +:foregit: + :enable_modules: true + :api_url: 'http://api.foreman' + :api_version: 2 + :consumer_key: 'key' + :consumer_secret: 'secret' + :timeout: 2 + :api_user: 'admin' + # An array of Foreman resources managed by Foregit + :resources: :architectures + # Git repository path + :repo_path: '/home/user/foregit/' + # The Git branch which should sync with Foreman + :repo_branch: 'master' + # Remote address for repo, it should be SSH + :repo_remote: 'git@github.com:myusername/foregit.git' + # Git configuration + :git_username: 'myusername' + :git_useremail: 'myusername@mail.org' + # A list of fields which should be removed from a Foreman resource before/after + # are synced within the instance and repo. + :ignored_foreman_fields: ['created_at', 'updated_at', 'sp_name', 'sp_subnet_id'] diff --git a/install.sh b/install.sh index ac2bdcb..f37f394 100755 --- a/install.sh +++ b/install.sh @@ -8,16 +8,19 @@ curl -L https://get.rvm.io | bash -s stable source /home/vagrant/.rvm/scripts/rvm echo "Install Ruby and Rails" -rvm use --install 2.0.0-p576 +rvm use --install 2.0.0-p594 gem install rails -v 4.0.0 --no-ri --no-rdoc echo "Install Puppet and Foreman" -sudo wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb -sudo dpkg -i puppetlabs-release-precise.deb +wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb +dpkg -i puppetlabs-release-precise.deb sudo echo "deb http://deb.theforeman.org/ precise 1.6" > /etc/apt/sources.list.d/foreman.list sudo echo "deb http://deb.theforeman.org/ plugins 1.6" >> /etc/apt/sources.list.d/foreman.list -sudo wget -q http://deb.theforeman.org/pubkey.gpg -O- | apt-key add - -sudo apt-get update -sudo apt-get install -y foreman-installer +wget -q http://deb.theforeman.org/pubkey.gpg -O- | apt-key add - +sudo apt-get update && sudo apt-get install -y foreman-installer sudo foreman-installer + +echo "Install accessories" +sudo apt-get install -y vim +sudo apt-get install -y git