diff options
author | Varac <varac@leap.se> | 2018-03-05 12:13:44 +0100 |
---|---|---|
committer | Varac <varac@leap.se> | 2018-03-05 13:03:24 +0100 |
commit | 712f0b0e23c15314ed60f72802e72bb3688d2c8c (patch) | |
tree | 4eaf70b3803e423064698d0744166af28dae7c4b /tests/example-provider | |
parent | 4c6fab10e8d4beffeb50ad4ae0abffbdf4c03a5a (diff) |
[vagrant] Use debian/jessie64 as vagrantbox
Resolves: #8909
Diffstat (limited to 'tests/example-provider')
-rw-r--r-- | tests/example-provider/README.md | 9 | ||||
-rw-r--r-- | tests/example-provider/Vagrantfile | 6 | ||||
-rw-r--r-- | tests/example-provider/vagrant/initialize.sh | 12 |
3 files changed, 23 insertions, 4 deletions
diff --git a/tests/example-provider/README.md b/tests/example-provider/README.md index 80cb3ae9..6d073d9f 100644 --- a/tests/example-provider/README.md +++ b/tests/example-provider/README.md @@ -1,8 +1,11 @@ -Here lies a script to generate a pre-configured provider using Vagrant virtual -machines. This virtual provider includes only a single node. +# Run LEAP provider locally with Vagrant + +You can use Vagrant to start a pre-configured example provider. +This virtual provider includes only a single node. +See [LEAP Vagrant documentation](https://leap.se/en/docs/platform/tutorials/vagrant) for more +details. All you have to do is this: cd leap_platform/tests/example-provider vagrant up - diff --git a/tests/example-provider/Vagrantfile b/tests/example-provider/Vagrantfile index e909e79b..dbd30185 100644 --- a/tests/example-provider/Vagrantfile +++ b/tests/example-provider/Vagrantfile @@ -12,7 +12,7 @@ Vagrant.configure("2") do |config| # Please verify the sha512 sum of the downloaded box before importing it into vagrant ! # see https://leap.se/en/docs/platform/details/development#Verify.vagrantbox.download # for details - config.vm.box = "LEAP/jessie" + config.vm.box = "debian/jessie64" config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] @@ -31,12 +31,16 @@ Vagrant.configure("2") do |config| s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile" end + config.vm.provision "shell", path: "vagrant/initialize.sh" config.vm.provision "puppet" do |puppet| puppet.manifests_path = "./vagrant" puppet.module_path = "../../puppet/modules" puppet.manifest_file = "install-platform.pp" puppet.options = "--verbose" puppet.hiera_config_path = "./hiera.yaml" + puppet.environment_variables = { + :LANG => "en_US.UTF-8" + } end config.vm.provision "shell", path: "vagrant/configure-leap.sh" diff --git a/tests/example-provider/vagrant/initialize.sh b/tests/example-provider/vagrant/initialize.sh new file mode 100644 index 00000000..5f87af6c --- /dev/null +++ b/tests/example-provider/vagrant/initialize.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -euxo pipefail + +echo -e "deb http://deb.debian.org/debian/ jessie main \ndeb http://security.debian.org/ jessie/updates main" > /etc/apt/sources.list +apt-get update +apt-get install -y --no-install-recommends puppet +echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen +echo "LANG=en_US.UTF-8" > /etc/default/locale +echo 'LC_ALL=en_US.UTF-8' >> /etc/environment +locale-gen +update-locale |