This is how I install Jenkins on a bare system. I'm using Ubuntu 12.04 32bit
Always good to update the system packages after a fresh install:
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # David Lutz's Multi VM Vagrantfile | |
| # inspired from Mark Barger's https://gist.github.com/2404910 | |
| boxes = [ | |
| { :name => :web, :role => 'web_dev', :ip => '192.168.33.1', :ssh_port => 2201, :http_fwd => 9980, :cpus =>4, :shares => true }, | |
| { :name => :data, :role => 'data_dev', :ip => '192.168.33.2', :ssh_port => 2202, :mysql_fwd => 9936, :cpus =>4 }, | |
| { :name => :railsapp, :role => 'railsapp_dev', :ip => '192.168.33.3', :ssh_port => 2203, :http_fwd => 9990, :cpus =>1} | |
| ] |
| #!/bin/bash | |
| # Script to create ansible playbook directories | |
| # define your roles here | |
| roles=(upgrade packages) | |
| directories=(tasks handlers files default vars templates) | |
| # create playbook | |
| mkdir global_vars |
| never use ec2 - exact_count paramter. This TERMINATED all the running instances except for exact_count number. This can have disatirous results, i hammered the whole cdlib dsc archivesspace server setup in AWs with this option. TODO: NEEDS to be noted in the options docs on this exact_count param. | |
| use stete: present to create a new instance | |
| not sure what state: running causes | |
| always disable api termination | |
| set to NOT DELETE on termination on ALL VOULUMES | |
| TODO: REBUILD FROM SCRATCH: FRONT END WITH APACHE PROXY (due to nginx mangling of paths see: apache directive = <TODO: lookup> |
| --- | |
| # | |
| # Ansible playbook: Webmin for Ubuntu v201501302302 | |
| # Louis T. Getterman IV (@LTGIV) | |
| # www.GotGetLLC.com / www.opensour.cc | |
| # | |
| # Example Usage: | |
| # [user@host ~$] ansible-playbook /etc/ansible/playbooks/ubuntu-webmin.yml --extra-vars 'target=nameFromHostsFile' | |
| # | |
| - hosts: '{{ target }}' |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.define "instance0" do |d| | |
| d.vm.box = "ubuntu/trusty64" | |
| d.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" |
Your AWS credentials can be set in a number of ways:
-a or --access-key for the Access Key ID and -s or --access-secret for the Secret Access Key.| #!/bin/bash | |
| set -e | |
| sudo rm -f /etc/update-motd.d/10-help-text | |
| sudo rm -f /etc/update-motd.d/51-cloudguest | |
| sudo rm -f /etc/update-motd.d/91-release-upgrade | |
| echo -e "[sysinfo]\nexclude_sysinfo_plugins = LandscapeLink" | sudo tee /etc/landscape/client.conf | |
| echo deb https://get.docker.com/ubuntu docker main | sudo tee /etc/apt/sources.list.d/docker.list | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 |
| # Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
| # Will include all hosts the playbook is run on. | |
| # Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
| - name: "Build hosts file" | |
| lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
| when: hostvars[item].ansible_default_ipv4.address is defined | |
| with_items: groups['all'] |