Skip to content

Commit babd39a

Browse files
author
Tim Pouyer
committed
Bug fixes, mtu settings, virtualbox unconnected virtual adapter fix, ssh settings
1 parent 4063f8c commit babd39a

File tree

4 files changed

+46
-3
lines changed

4 files changed

+46
-3
lines changed

scripts/stackinabox/init.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Requires=docker.socket
238238
[Service]
239239
Type=notify
240240
ExecStart=
241-
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 --iptables=false --ip-masq=true --ip-forward=true --max-concurrent-downloads=5 --max-concurrent-uploads=5 --mtu 1500
241+
ExecStart=/usr/bin/dockerd -H fd:// --iptables=false --ip-masq=true --ip-forward=true --max-concurrent-downloads=5 --max-concurrent-uploads=5 --mtu 1500 --insecure-registry 192.168.27.100:5555
242242
ExecReload=/bin/kill -s HUP $MAINPID
243243
LimitNOFILE=1048576
244244
LimitNPROC=infinity
@@ -279,6 +279,11 @@ sudo systemctl daemon-reload
279279
#sudo systemctl restart systemd-networkd
280280
sudo systemctl restart docker.service
281281

282+
# set mysqld apparmor profile to disabled
283+
# this profile effects lxc containers run on this host when using docker
284+
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
285+
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
286+
282287
# install 'shellinabox' to make using this image on windows easier
283288
# shellinabox will be available at http://192.168.27.100:4200
284289
echo "install shellinabox"

scripts/stackinabox/local.conf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ API_RATE_LIMIT=False
215215
force_config_drive=False
216216
config_drive_format=vfat
217217
metadata_host=$HOST_IP
218+
network_device_mtu=1550
218219

219220
[[post-config|$NEUTRON_CONF]]
220221
[DEFAULT]
@@ -224,14 +225,20 @@ notify_nova_on_port_data_changes=True
224225
enable_snat_by_default=True
225226
comment_iptables_rules=True
226227
#service_plugins+=,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2
228+
advertise_mtu=True
229+
network_device_mtu=1550
227230

228231
[database]
229232
min_pool_size=10
230233
max_pool_size=50
231234
max_overflow=50
232235

233236
[[post-config|/$Q_PLUGIN_CONF_FILE]]
234-
global_physnet_mtu=1500
237+
[DEFAULT]
238+
global_physnet_mtu=1550
239+
240+
[ml2]
241+
physical_network_mtus=public:1550
235242

236243
[agent]
237244
l2_population=True

scripts/stackinabox/post-config.sh

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,38 @@ cp /vagrant/scripts/bluebox-theme/logo-splash.png /opt/stack/horizon/static/dash
9696
# haven't been able to find this file yet
9797
#mv /vagrant/scripts/bluebox-theme/bluebox.ico /opt/stack/horizon/static/dashboard/img/favicon.ico
9898

99-
cat << EOF
99+
# setup demo user on this system
100+
sudo useradd -m -p $(perl -e 'printf("%s\n", crypt("labstack", "password"))') -s /bin/bash demo
101+
sudo usermod -aG docker demo
102+
sudo usermod -aG sudo demo
103+
sudo cp /home/vagrant/demo_key.priv /home/demo/demo_key.priv
104+
sudo chown demo:demo /home/demo/demo_key.priv
105+
106+
sudo cp /home/vagrant/admin-openrc.sh /home/demo/admin-openrc.sh
107+
sudo chown demo:demo /home/demo/admin-openrc.sh
108+
109+
sudo cp /home/vagrant/demo-openrc.sh /home/demo/demo-openrc.sh
110+
sudo chown demo:demo /home/demo/demo-openrc.sh
111+
112+
# turn off ssh KnowHostsFile and StrictHostChecking
113+
# for this machine (demo purposes only, don't ever do in production)
114+
sudo bash -c 'cat >> /etc/ssh/ssh_config' <<'EOF'
115+
Host *
116+
StrictHostKeyChecking no
117+
UserKnownHostsFile=/dev/null
118+
EOF
119+
120+
cat << 'EOF'
121+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
100122
This is your host IP address: 192.168.27.100
101123
Horizon is now available at http://192.168.27.100/dashboard
102124
Keystone is serving at http://192.168.27.100/identity
103125
The default users are: admin and demo
104126
The password: labstack
105127
Key pair is at /home/vagrant/demo_key.priv
128+
129+
++++++ Login to this VM using:
130+
ssh demo@192.168.27.100
131+
password: labstack
132+
106133
EOF

vagrant/Vagrantfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
6565
vb.customize ["modifyvm", :id, "--usbehci", "off"]
6666
vb.customize ["modifyvm", :id, "--vrde", "off"]
6767
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
68+
#fix for https://github.com/mitchellh/vagrant/issues/7648
69+
vb.customize ['modifyvm', :id, '--cableconnected1', 'on']
70+
vb.customize ['modifyvm', :id, '--cableconnected2', 'on']
71+
vb.customize ['modifyvm', :id, '--cableconnected3', 'on']
6872

6973
if !File.exists?($disk)
7074
vb.customize ['createhd', '--filename', $disk, '--size', 500 * 1024]

0 commit comments

Comments
 (0)