Skip to content

Commit 8909f13

Browse files
author
Tim Pouyer
committed
Updated to add Docker runtime to image (to be used by downstream consumers)
1 parent 631e102 commit 8909f13

File tree

5 files changed

+42
-8
lines changed

5 files changed

+42
-8
lines changed

scripts/docker/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Vagrant
2+
.DS_Store
3+
registry/

scripts/docker/init.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
4+
sudo bash -c "echo 'deb https://apt.dockerproject.org/repo ubuntu-trusty main' > /etc/apt/sources.list.d/docker.list"
5+
6+
sudo apt-get -qqy update
7+
sudo apt-get install -qqy docker-engine
8+
9+
sudo usermod -aG docker vagrant
10+
newgrp docker

scripts/stackinabox/local.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ LOGDAYS=1
9595
VERBOSE=True
9696
LOG_COLOR=True
9797
LOGFILE=$DEST/logs/stack.sh.log
98+
USE_SCREEN=True
9899
SCREEN_LOGDIR=$DEST/logs
99100
ENABLE_DEBUG_LOG_LEVEL=True
100101

scripts/stackinabox/openrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
if [[ -n "$1" ]]; then
4+
OS_USERNAME=$1
5+
fi
6+
if [[ -n "$2" ]]; then
7+
OS_TENANT_NAME=$2
8+
fi
9+
10+
export OS_USERNAME=${OS_USERNAME:-demo}
11+
export OS_TENANT_NAME=${OS_TENANT_NAME:-demo}
12+
export OS_PASSWORD=labstack
13+
export OS_NO_CACHE=1
14+
export OS_REGION_NAME=${REGION_NAME:-labstack}
15+
export HOST_IP=${HOST_IP:-192.168.27.100}
16+
export SERVICE_HOST=${SERVICE_HOST:-$HOST_IP}
17+
export GLANCE_HOST=${GLANCE_HOST:-$HOST_IP}
18+
export SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
19+
export KEYSTONE_AUTH_PROTOCOL=${KEYSTONE_AUTH_PROTOCOL:-$SERVICE_PROTOCOL}
20+
export KEYSTONE_AUTH_HOST=${KEYSTONE_AUTH_HOST:-$SERVICE_HOST}
21+
export OS_IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-2.0}
22+
export OS_AUTH_URL=$KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:5000/v${OS_IDENTITY_API_VERSION}
23+
24+
export BARBICAN_ENDPOINT=$SERVICE_PROTOCOL://$SERVICE_HOST:9311

vagrant/Vagrantfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
4242
end
4343

4444
if Vagrant.has_plugin?("vagrant-vbguest")
45-
config.vbguest.auto_update = true
45+
config.vbguest.auto_update = false
4646
end
4747

4848
#if !Vagrant.has_plugin?("vagrant-reload")
@@ -61,7 +61,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
6161
stackinabox.vm.box_url = $box_url
6262
stackinabox.vm.box_download_insecure = true
6363

64-
stackinabox.vm.hostname = "stackinabox"
64+
stackinabox.vm.hostname = "openstack.stackinabox.io"
6565

6666
# eth0, this is the vbox "management" network (10.0.2.x), auto created/configured by vagrant, uses NAT
6767
# not defined here b/c vbox creates this network behind the scenes
@@ -123,12 +123,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
123123

124124
stackinabox.vm.provision "file", source: File.expand_path(File.join(vagrant_dir, "..", "scripts", "stackinabox", "openrc"), __FILE__), destination: "/home/vagrant/openrc"
125125

126-
#stackinabox.vm.provision :reload
127-
128-
#stackinabox.vm.provision :shell, name: "operations", privileged: true, keep_color: false, path: File.expand_path(File.join(vagrant_dir, "..", "scripts", "operations", "init.sh"), __FILE__)
129-
130-
#stackinabox.vm.provision :shell, name: "chef", privileged: true, keep_color: false, path: File.expand_path(File.join(vagrant_dir, "..", "scripts", "chef", "init.sh"), __FILE__)
126+
# install docker
127+
stackinabox.vm.provision "shell", name: "install_docker", privileged: false, keep_color: false, path: File.expand_path(File.join(vagrant_dir, "..", "scripts", "docker", "init.sh"), __FILE__)
131128

132-
133129
end
134130
end

0 commit comments

Comments
 (0)