summaryrefslogtreecommitdiff
path: root/vagrant
diff options
context:
space:
mode:
Diffstat (limited to 'vagrant')
-rwxr-xr-xvagrant/add-pixelated.sh32
-rwxr-xr-xvagrant/configure-leap.sh12
-rw-r--r--vagrant/vagrant.config10
3 files changed, 43 insertions, 11 deletions
diff --git a/vagrant/add-pixelated.sh b/vagrant/add-pixelated.sh
new file mode 100755
index 00000000..f9908947
--- /dev/null
+++ b/vagrant/add-pixelated.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# adds pixelated-server to the node
+
+. /vagrant/vagrant/vagrant.config
+
+cd "$PROVIDERDIR"
+
+if ! git submodule status files/puppet/modules/pixelated > /dev/null 2>&1; then
+ git submodule add https://github.com/pixelated/puppet-pixelated.git files/puppet/modules/pixelated
+fi
+
+echo '{}' > services/pixelated.json
+[ -d files/puppet/modules/custom/manifests ] || mkdir -p files/puppet/modules/custom/manifests
+echo 'class custom { include ::pixelated}' > files/puppet/modules/custom/manifests/init.pp
+
+$LEAP $OPTS -v 2 deploy
+
+echo '==============================================='
+echo 'testing the platform'
+echo '==============================================='
+
+$LEAP $OPTS -v 2 test --continue
+
+
+echo -e '\n===========================================================================================================\n\n'
+echo -e 'You are now ready to use your vagrant Pixelated provider.\n'
+
+echo -e 'The LEAP webapp is available at https://localhost:4443. Use it to register an account before using the Pixelated Useragent.\n'
+echo -e 'The Pixelated Useragent is available at https://localhost:8080\n'
+
+echo -e 'Please add an exception for both sites in your browser dialog to allow the self-signed certificate.\n'
diff --git a/vagrant/configure-leap.sh b/vagrant/configure-leap.sh
index bf07f3a6..9ddee039 100755
--- a/vagrant/configure-leap.sh
+++ b/vagrant/configure-leap.sh
@@ -3,15 +3,6 @@
. /vagrant/vagrant/vagrant.config
-#OPTS='--no-color'
-OPTS=''
-USER='vagrant'
-NODE='node1'
-SUDO="sudo -u ${USER}"
-PROVIDERDIR="/home/${USER}/leap/configuration"
-LEAP="$SUDO /usr/local/bin/leap"
-GIT="$SUDO git"
-
echo '==============================================='
echo 'configuring leap'
echo '==============================================='
@@ -93,8 +84,9 @@ echo -e '\n=====================================================================
echo -e 'You are now ready to use your local LEAP provider.\n'
echo 'If you want to use the *Bitmask client* with your provider, please update your /etc/hosts with following dns overrides:'
-$LEAP leap list --print ip_address,domain.full,dns.aliases | sed 's/^.* //' | sed 's/, null//g' | tr -d '\]\[",'
+$LEAP list --print ip_address,domain.full,dns.aliases | sed 's/^.* //' | sed 's/, null//g' | tr -d '\]\[",'
echo 'Please see https://leap.se/en/docs/platform/tutorials/vagrant#use-the-bitmask-client-to-do-an-initial-soledad-sync for more details how to use and test your LEAP provider.'
echo -e "\nIf you don't want to use the Bitmask client, please ignore the above instructions.\n"
echo -e 'The LEAP webapp is now available at https://localhost:4443\n'
+echo -e 'Please add an exception in your browser dialog to allow the self-signed certificate.\n'
diff --git a/vagrant/vagrant.config b/vagrant/vagrant.config
index 4d568c03..e601488d 100644
--- a/vagrant/vagrant.config
+++ b/vagrant/vagrant.config
@@ -1,4 +1,4 @@
-# config values used by configure-leap.sh
+# provider config values used by vagrant provision scripts
provider_domain='example.org'
provider_name='Leap Example Provider'
contacts="no-reply@$provider_domain"
@@ -11,4 +11,12 @@ contacts="no-reply@$provider_domain"
# services='webapp,mx,couchdb,soledad,monitor'
services='webapp,mx,couchdb,soledad'
+# default vars used by vagrant provision scripts
+OPTS=''
+USER='vagrant'
+NODE='node1'
+SUDO="sudo -u ${USER}"
+PROVIDERDIR="/home/${USER}/leap/configuration"
+LEAP="$SUDO /usr/local/bin/leap"
+GIT="$SUDO git"