From 895faa7dc94b554881b4330f20354670c276df19 Mon Sep 17 00:00:00 2001 From: Brandon Kreisel Date: Fri, 2 Oct 2015 22:36:56 -0400 Subject: [PATCH 1/3] Add OS X bootstrap for integration enviornment Installs requirements and sets up environment to run boulder and integration tests --- tests/mac-bootstrap.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 tests/mac-bootstrap.sh diff --git a/tests/mac-bootstrap.sh b/tests/mac-bootstrap.sh new file mode 100755 index 000000000..38db6a969 --- /dev/null +++ b/tests/mac-bootstrap.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +#Check Homebrew +if ! hash brew 2>/dev/null; then + echo "Homebrew Not Installed\nDownloading..." + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +fi + +brew install libtool mariadb rabbitmq coreutils go + +mysql.server start + +rabbit_pid=`ps | grep rabbitmq | grep -v grep | awk '{ print $1}'` +if [ -n rabbit_pid ]; then + echo "RabbitMQ already running" +else + rabbitmq-server & +fi + +hosts_entry=`cat /etc/hosts | grep "127.0.0.1 le.wtf"` +if [ -z hosts_entry ]; then + echo "Adding hosts entry for le.wtf..." + sudo sh -c "echo 127.0.0.1 le.wtf >> /etc/hosts" +fi + +./tests/boulder-start.sh From 0868a5962f4ae812f9bcb1b39e4c3bace207074b Mon Sep 17 00:00:00 2001 From: Brandon Kreisel Date: Fri, 2 Oct 2015 22:37:22 -0400 Subject: [PATCH 2/3] Add documentation for OS X bootstrap script --- docs/contributing.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/contributing.rst b/docs/contributing.rst index c6443e3b2..7b0768efb 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -67,6 +67,8 @@ The following tools are there to help you: Integration ~~~~~~~~~~~ +Mac OS X users: Run `./tests/mac-integration.sh` to configure the +integration tests environment and start boulder First, install `Go`_ 1.5, libtool-ltdl, mariadb-server and rabbitmq-server and then start Boulder_, an ACME CA server:: From 8409c9c658b247421caef540d57410dc8a00ef41 Mon Sep 17 00:00:00 2001 From: Brandon Kreisel Date: Sat, 3 Oct 2015 11:27:39 -0400 Subject: [PATCH 3/3] Meddle with more documentation and learn how to bash flag --- docs/contributing.rst | 6 +++--- tests/mac-bootstrap.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index 7b0768efb..c746c6ae7 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -67,10 +67,10 @@ The following tools are there to help you: Integration ~~~~~~~~~~~ -Mac OS X users: Run `./tests/mac-integration.sh` to configure the -integration tests environment and start boulder +Mac OS X users: Run `./tests/mac-bootstrap.sh` instead of `boulder-start.sh` to +install dependencies, configure the environment, and start boulder. -First, install `Go`_ 1.5, libtool-ltdl, mariadb-server and +Otherwise, install `Go`_ 1.5, libtool-ltdl, mariadb-server and rabbitmq-server and then start Boulder_, an ACME CA server:: ./tests/boulder-start.sh diff --git a/tests/mac-bootstrap.sh b/tests/mac-bootstrap.sh index 38db6a969..66036ce56 100755 --- a/tests/mac-bootstrap.sh +++ b/tests/mac-bootstrap.sh @@ -11,14 +11,14 @@ brew install libtool mariadb rabbitmq coreutils go mysql.server start rabbit_pid=`ps | grep rabbitmq | grep -v grep | awk '{ print $1}'` -if [ -n rabbit_pid ]; then +if [ -n "$rabbit_pid" ]; then echo "RabbitMQ already running" else rabbitmq-server & fi hosts_entry=`cat /etc/hosts | grep "127.0.0.1 le.wtf"` -if [ -z hosts_entry ]; then +if [ -z "$hosts_entry" ]; then echo "Adding hosts entry for le.wtf..." sudo sh -c "echo 127.0.0.1 le.wtf >> /etc/hosts" fi