Fully functioning Debian based boulder server =]

This commit is contained in:
Chris Snijder 2016-08-04 11:07:36 +02:00
parent cb4d8ae3b2
commit 3248390027
2 changed files with 30 additions and 5 deletions

2
Vagrantfile vendored
View File

@ -27,7 +27,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vbguest.no_remote = false
config.vm.define "boulder", autostart: true do |server|
server.vm.box = "ubuntu/trusty64"
server.vm.box = "debian/jessie64"
server.vm.hostname = "boulder.local"
server.vm.network :private_network, ip: ENVS['PROJECT_SERVER_IP']
server.vm.synced_folder ".", "/vagrant/", type: "virtualbox"

View File

@ -36,9 +36,10 @@ fi
source ~/.variables
# Add PPA for MariaDb
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirrors.supportex.net/mariadb/repo/10.1/ubuntu trusty main'
# Add repo for MariaDb
sudo apt-get install -y software-properties-common
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386] http://mirror.i3d.net/pub/mariadb/repo/10.1/debian jessie main'
apt-get update
apt-get upgrade -y
@ -72,7 +73,6 @@ mkdir -p /gopath/src
virtualenv /boulder_venv -p /usr/bin/python2
source /boulder_venv/bin/activate
# Install godep
go get github.com/tools/godep
@ -104,4 +104,29 @@ if grep -Fq "/usr/local/lib/libpkcs11-proxy.so" test/test-ca.key-pkcs11.json; th
git apply /vagrant/softhsm.patch
fi
cat <<EOF > "/lib/systemd/system/boulder.service"
[Unit]
Description=Boulder Server
After=network.target
Wants=mariadb.service,rabbitmq.service
[Service]
Type=simple
KillMode=process
RemainAfterExit=no
Restart=always
Environment="GOROOT=/usr/local/go"
Environment="GOPATH=/gopath"
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/gopath/bin:/usr/local/go/bin"
Environment="GO15VENDOREXPERIMENT=1"
Environment="SOFTHSM_CONF=/gopath/src/github.com/letsencrypt/boulder/test/softhsm.conf"
WorkingDirectory=/gopath/src/github.com/letsencrypt/boulder/
ExecStart=/boulder_venv/bin/python ./start.py
[Install]
WantedBy=multi-user.target
EOF
systemctl enable boulder.service
systemctl start boulder.service
echo "Provisioning completed."