Skip to content

Commit 7f22102

Browse files
author
Tim Pouyer
committed
Adding a few updates before demo
1 parent 36682dd commit 7f22102

File tree

5 files changed

+26
-13
lines changed

5 files changed

+26
-13
lines changed

scripts/stackinabox/init.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ sudo service ntp restart
176176

177177
# Configure MTU on VM interfaces. Also requires manually configuring the same MTU on
178178
# the equivalent 'vboxnet' interfaces on the host. i.e. sudo ip link set dev vboxnet0 mtu $MTU
179-
# sudo ip link set dev eth1 mtu $MTU
180-
# sudo ip link set dev eth2 mtu $MTU
179+
sudo ip link set dev eth1 mtu $MTU
180+
sudo ip link set dev eth2 mtu $MTU
181181

182182
# Restart networking
183183
sudo /etc/init.d/networking restart
@@ -238,10 +238,16 @@ sudo update-rc.d devstack start 98 2 3 4 5 . stop 02 0 1 6 .
238238
# wait for openstack to startup
239239
sleep 60
240240

241-
# clean up after ourselves
242-
/vagrant/scripts/minimize/clean.sh
241+
# install java (for use with udclient)
242+
sudo apt-get install -qqy default-jre
243+
sudo touch /etc/profile.d/java_home.sh
244+
sudo bash -c 'cat >> /etc/profile.d/java_home.sh' <<'EOF'
245+
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre
246+
EOF
247+
sudo chmod 755 /etc/profile.d/java_home.sh
243248

244-
sudo rm -rf /var/lib/apt/lists/*
249+
# clean up after ourselves
250+
/vagrant/scripts/minimize/clean.sh
245251

246252
sudo btrfs quota enable /var/lib/lxd
247253

scripts/stackinabox/openrc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ export OS_USERNAME=${OS_USERNAME:-demo}
1111
export OS_TENANT_NAME=${OS_TENANT_NAME:-demo}
1212
export OS_PASSWORD=labstack
1313
export OS_NO_CACHE=1
14-
export OS_REGION_NAME=${REGION_NAME:-labstack}
14+
export OS_REGION_NAME=${REGION_NAME:-RegionOne}
1515
export HOST_IP=${HOST_IP:-192.168.27.100}
1616
export SERVICE_HOST=${SERVICE_HOST:-$HOST_IP}
1717
export GLANCE_HOST=${GLANCE_HOST:-$HOST_IP}
1818
export SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
1919
export KEYSTONE_AUTH_PROTOCOL=${KEYSTONE_AUTH_PROTOCOL:-$SERVICE_PROTOCOL}
2020
export KEYSTONE_AUTH_HOST=${KEYSTONE_AUTH_HOST:-$SERVICE_HOST}
2121
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
22+
export OS_AUTH_URL=$KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:5000/v${OS_IDENTITY_API_VERSION}

scripts/stackinabox/stack-noscreenrc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
#!/bin/bash
22

3-
/opt/stack/etcd/etcd-v2.2.2-linux-amd64/etcd --data-dir /opt/stack/etcd/db.etcd --advertise-client-urls http://0.0.0.0:4001 --listen-client-urls http://0.0.0.0:4001 >> /opt/stack/logs/etcd-server.log 2>&1 &
3+
#/opt/stack/etcd/etcd-v2.2.2-linux-amd64/etcd --data-dir /opt/stack/etcd/db.etcd --advertise-client-urls http://0.0.0.0:4001 --listen-client-urls http://0.0.0.0:4001 >> /opt/stack/logs/etcd-server.log 2>&1 &
44

5-
sudo /usr/bin/docker daemon -H tcp://0.0.0.0:2375 --cluster-store etcd://localhost:4001 >> /opt/stack/logs/docker-engine.log 2>&1 &
5+
#sudo /usr/bin/docker daemon -H tcp://0.0.0.0:2375 --cluster-store etcd://localhost:4001 >> /opt/stack/logs/docker-engine.log 2>&1 &
66

7-
sudo PYTHONPATH=:/opt/stack/kuryr SERVICE_USER=admin SERVICE_PASSWORD=labstack SERVICE_TENANT_NAME=admin SERVICE_TOKEN=labstack IDENTIY_URL=http://127.0.0.1:5000/v2.0 python /opt/stack/kuryr/scripts/run_server.py --config-file /etc/kuryr/kuryr.conf >> /opt/stack/logs/ >> /opt/stack/logs/kuryr.log 2>&1 &
7+
#sudo PYTHONPATH=:/opt/stack/kuryr SERVICE_USER=admin SERVICE_PASSWORD=labstack SERVICE_TENANT_NAME=admin SERVICE_TOKEN=labstack IDENTIY_URL=http://127.0.0.1:5000/v2.0 python /opt/stack/kuryr/scripts/run_server.py --config-file /etc/kuryr/kuryr.conf >> /opt/stack/logs/kuryr.log 2>&1 &
8+
9+
sudo ./scripts/run_kuryr.sh >> /opt/stack/logs/kuryr.log 2>&1 &
10+
11+
sudo service docker restart >> /opt/stack/logs/docker-restart.log 2>&1 &
812

913
/usr/local/bin/glance-registry --config-file=/etc/glance/glance-registry.conf >> /opt/stack/logs/g-reg.log 2>&1 &
1014

vagrant/Personalization.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Use NFS? (won't work on windows)
22
$use_nfs = false
33

4+
# Configure MTU on VM interfaces. Also requires manually configuring the same MTU on
5+
# the equivalent 'vboxnet' interfaces on the host. i.e. sudo ip link set dev vboxnet0 mtu $MTU
6+
$mtu = 1500
7+
48
# Box name
59
$box = "ubuntu/trusty64"
610

vagrant/Vagrantfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
4747
config.vm.define "stackinabox" do |stackinabox|
4848

4949
config.vm.synced_folder File.expand_path(File.join(vagrant_dir, ".."), __FILE__), "/vagrant"#, :nfs => $use_nfs
50+
#config.vm.synced_folder File.expand_path(File.join(vagrant_dir, "..", "scripts", "docker", "runtime"), __FILE__), "/var/lib/docker", create: true
5051

5152
config.ssh.forward_agent = true
5253
config.ssh.insert_key = false
@@ -79,7 +80,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
7980
vb.customize ["modifyvm", :id, "--cpus", "#{$cpus}"] # set number of vcpus
8081
vb.customize ["modifyvm", :id, "--memory", "#{$memory}"] # set amount of memory allocated vm memory
8182
vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"] # set guest OS type
82-
#vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] # enables DNS resolution from guest using host's DNS
83+
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] # enables DNS resolution from guest using host's DNS
8384
#vb.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] # turn on promiscuous mode on nic 2
8485
vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"] # turn on promiscuous mode on nic 3
8586
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]

0 commit comments

Comments
 (0)