Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

agoravoting/agora-ciudadana-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agora Ciudadana Puppet+Vagrant Box

puppet+vagrant setup for agora-ciudadana deployment

Installation (vagrant+puppet)

Install vagrant

Download the repository

Install the vb-guest plugin

  • vagrant plugin install vagrant-vbguest

Edit configuration

It has some sane defaults that makes the deploy work by default, but you can edit the manifests/init.pp if you want. Take a look at the "Edit configuration" part of the "Standalone installation" process for more details.

Run

  • vagrant up

Wait for the provisioning to finish

If you want to use it as is with the default configuration (which only makes if it's a test or development machine, otherwise it's completely UNSAFE), you need to add the following lines to /etc/hosts (from root user) on the host machine:

  • echo "127.0.0.1 local.dev" >> /etc/hosts
  • echo "127.0.0.1 sentry.local.dev" >> /etc/hosts
  • echo "127.0.0.1 fnmt.local.dev" >> /etc/hosts

and you will have the service available at http://local.dev:9443/ directly on your host machine, since the port is forwarded from the guest to your host.

Accessing the vm

  • vagrant ssh
  • su -

Applying puppet manually inside the vm

This is only needed if something went wrong or you want update the installation. Apply puppet manually with:

  • cd /vagrant; sudo puppet apply manifests/init.pp --modulepath modules/

Standalone installation (no vagrant, only puppet)

Apply puppet manually in a fresh Ubuntu 12.04 LTS (with no apache installed!) with:

Edit configuration

It's now the time to edit manifests/init.pp. The variables are well documented, so please take a while to read the comments.

You'll notice that the passwords are always marked as . You can automatically populate each password with a different value executing the following script:

  • shell/set_passwords.sh manifests/init.pp

Execute deployment

Just execute:

  • sh shell/bootstrap.sh

  • puppet apply manifests/init.pp --modulepath modules/

If you want to log the output to a file use

  • puppet apply manifests/init.pp --modulepath modules/ | tee /tmp/puppet.log

Troubleshooting

If you get the following error during provisioning:

Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly....

You need to

  • vagrant ssh
  • sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

back on the host

  • vagrant reload

This has been seen on virtualbox 4.3.10. See hashicorp/vagrant#3341

If you get the following error during provisioning:

Error: /etc/apt/sources.list contains a cdrom source; not installing. Use 'allowcdrom' to override this failure.

You need to

  • vi /etc/apt/sources.list

Comment out entries beginning with "deb cdrom:..."

Save and retry puppet provisioning