Xenial image working. Hexchat replaces Xchat. Nat networking instead of private networks.

This commit is contained in:
Mark Korondi 2017-04-11 00:36:05 +02:00
parent 06937f8172
commit cccda5d7a1
13 changed files with 144 additions and 75 deletions

View File

@ -1,5 +1,5 @@
OpenStack Training Virtual Environment
======================================
OpenStack Upstream Institute Virtual Environment
================================================
[bit.ly/training-vm](http://bit.ly/training-vm)
-----------------------------------------------
@ -11,13 +11,13 @@ Introduction
A Virtual Machine that has installed in it software what you need to start
hacking OpenStack. If you're coming to the [Upstream
Training](http://docs.openstack.org/upstream-training/) two days before
Institute](http://docs.openstack.org/upstream-training/) two days before
[OpenStack Summit](https://www.openstack.org/summit/) starts, you are at the
right place.
### What do I need?
* 6GB of _free_ RAM (so at least 8GB in your laptop)
* 6GB of **free** RAM (so at least 8GB in your laptop)
* Recent CPU with at least 4 cores
* 10GB disk space
* [VirtualBox](https://www.virtualbox.org/)
@ -41,26 +41,16 @@ Instructions
1. Set up VirtualBox
2. Download the [pre-built image][image]
3. Import the `ova` file (`File` -> `Import appliance...`) (More details to import on Windows are [here][ova-import-help].)
4. Set up a private network:
- `File` -> `Preferences` -> `Network` -> `Host-only Networks`
- Create a new host-only network with the following settings:
* *IPv4 Address:* 192.168.50.1
* *IPv4 Network Mask:* 255.255.255.0
* *DHCP Server*: disabled
- Select the virtual machine, `Settings` -> `Network` -> `Adapter 2`
- Make sure that the adapter is enabled, attached to the host-only network
you created.
5. Start up the VM
6. Open a terminal and start devstack
cd /opt/devstack
./stack.sh
This step takes about 10-15 minutes, it needs an internet connection,
4. Start up the VM
5. Open a terminal and start devstack
``` bash
cd /opt/devstack
./stack.sh
```
This step takes about 10 minutes, it needs an internet connection,
however the expected downloaded data stays low if using a fresh enough
appliance.
### Building your own
1. Set up VirtualBox
@ -70,21 +60,15 @@ Instructions
5. `vagrant up`
6. `vagrant reload`
7. `vagrant ssh`
8. Start devstack
cd /opt/devstack
./stack.sh
This step takes about 10-15 minutes, it needs an internet connection,
however the expected downloaded data stays low if using a fresh enough
appliance.
Follow instructions [as for the prebuilt image](#using-a-prebuilt-image)
### Roll your own image
Essentially the same procedure, with exporting an ova archive at the end which
then can be distributed and easily import into VirtualBox
`./create-training-box.sh` is a handy tool that sets up everything with vagrant
`./create-training-box.sh` is a handy tool that sets up everything with Vagrant
and then creates the distributable box file.
### Learn how to easily set up devstack
@ -107,20 +91,20 @@ are
* a browser (Firefox)
* a terminal emulator
* a text editor (Geany, vim)
* an IRC client (XChat)
* an IRC client (HexChat)
The browser already contains a couple of handy bookmarks on the bookmark bar.
This document can be reached via the *VM Help* bookmark. When `stack.sh`
This document can be reached via the **VM Help** bookmark. When `stack.sh`
finished running, you can open the OpenStack Horizon Dashboard using the
*DevStack* bookmark.
**DevStack** bookmark.
DevStack install OpenStack software to `/opt/stack`. You can edit these files
using you preferred editor of choice. You can install any software from the
Ubuntu repoistories using the default `vagrant` user (no password needed for
sudo).
Ubuntu repoistories using the default `ubuntu` user (password: `ubuntu`, however
no password needed for sudo).
To log in to IRC, XChat is set up for you. Please make sure that you replace the
default user `vagrant` upon first start before logging in to Freenode channels.
To log in to IRC, HexChat is set up for you. Please make sure that you replace the
default user `ubuntu` upon first start before logging in to Freenode channels.
The installed OpenStack cloud is capable of running virtual machines. However,
please keep in mind, due to the significant memory requirements of running a VM
@ -140,8 +124,8 @@ Devstack running
Geany with keystone code loaded
![Geany with keystone code loaded](docs/02.png "Geany with keystone code loaded")
git and XChat
![git and XChat](docs/03.png "git and XChat")
git and HexChat
![git and XChat](docs/03.png "git and HexChat")
License
-------

3
Vagrantfile vendored
View File

@ -7,6 +7,7 @@ Vagrant.configure(2) do |config|
vb.name = "upstream-training"
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
vb.customize ["modifyvm", :id, "--accelerate3d", "on"]
end
config.vm.provision :shell, inline: "/vagrant/install-base.sh",
privileged: false, keep_color: true
@ -17,6 +18,6 @@ Vagrant.configure(2) do |config|
config.vm.provision :shell, inline: "/vagrant/configure-vagrant.sh",
privileged: false, keep_color: true
config.vm.box_check_update = false
config.vm.network :private_network, ip: "192.168.50.4"
config.ssh.forward_x11 = true
config.ssh.forward_agent = true
end

View File

@ -11,7 +11,7 @@
#
# By default this script does nothing.
dd if=/dev/zero of=/home/vagrant/swap.img bs=1M count=2048 >> /tmp/rc.local.log 2>&1
mkswap /home/vagrant/swap.img >> /tmp/rc.local.log 2>&1
swapon /home/vagrant/swap.img >> /tmp/rc.local.log 2>&1
dd if=/dev/zero of=/swap.img bs=1M count=2048 >> /tmp/rc.local.log 2>&1
mkswap /swap.img >> /tmp/rc.local.log 2>&1
swapon /swap.img >> /tmp/rc.local.log 2>&1
exit 0

View File

@ -1,4 +1,4 @@
favorites=exo-file-manager.desktop,firefox.desktop,geany.desktop,xchat.desktop,exo-terminal-emulator.desktop
favorites=exo-file-manager.desktop,firefox.desktop,geany.desktop,xchat.desktop,exo-terminal-emulator.desktop,hexchat.desktop
recent=
button-title=Menu
button-icon=xfce4-whiskermenu

View File

@ -66,7 +66,7 @@ user_pref("e10s.rollout.cohort", "disqualified-test");
user_pref("e10s.rollout.cohortSample", "0.887414");
user_pref("experiments.activeExperiment", false);
user_pref("extensions.blocklist.pingCountVersion", 0);
user_pref("extensions.bootstrappedAddons", "{\"e10srollout@mozilla.org\":{\"version\":\"1.3\",\"type\":\"extension\",\"descriptor\":\"/home/vagrant/.mozilla/firefox/yncyd31n.default/features/{1cc1c36d-e330-42fe-8a48-6322ee32262e}/e10srollout@mozilla.org.xpi\",\"multiprocessCompatible\":false,\"runInSafeMode\":true},\"webcompat@mozilla.org\":{\"version\":\"1.0\",\"type\":\"extension\",\"descriptor\":\"/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi\",\"multiprocessCompatible\":false,\"runInSafeMode\":true},\"firefox@getpocket.com\":{\"version\":\"1.0.4\",\"type\":\"extension\",\"descriptor\":\"/usr/lib/firefox/browser/features/firefox@getpocket.com.xpi\",\"multiprocessCompatible\":false,\"runInSafeMode\":true}}");
user_pref("extensions.bootstrappedAddons", "{\"e10srollout@mozilla.org\":{\"version\":\"1.3\",\"type\":\"extension\",\"descriptor\":\"/home/ubuntu/.mozilla/firefox/yncyd31n.default/features/{1cc1c36d-e330-42fe-8a48-6322ee32262e}/e10srollout@mozilla.org.xpi\",\"multiprocessCompatible\":false,\"runInSafeMode\":true},\"webcompat@mozilla.org\":{\"version\":\"1.0\",\"type\":\"extension\",\"descriptor\":\"/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi\",\"multiprocessCompatible\":false,\"runInSafeMode\":true},\"firefox@getpocket.com\":{\"version\":\"1.0.4\",\"type\":\"extension\",\"descriptor\":\"/usr/lib/firefox/browser/features/firefox@getpocket.com.xpi\",\"multiprocessCompatible\":false,\"runInSafeMode\":true}}");
user_pref("extensions.databaseSchema", 17);
user_pref("extensions.e10s.rollout.hasAddon", false);
user_pref("extensions.e10s.rollout.policy", "49a");
@ -83,7 +83,7 @@ user_pref("extensions.ui.dictionary.hidden", true);
user_pref("extensions.ui.experiment.hidden", true);
user_pref("extensions.ui.lastCategory", "addons://list/service");
user_pref("extensions.ui.locale.hidden", true);
user_pref("extensions.xpiState", "{\"app-system-addons\":{\"e10srollout@mozilla.org\":{\"d\":\"/home/vagrant/.mozilla/firefox/yncyd31n.default/features/{1cc1c36d-e330-42fe-8a48-6322ee32262e}/e10srollout@mozilla.org.xpi\",\"e\":true,\"v\":\"1.3\",\"st\":1476544192000}},\"app-system-defaults\":{\"e10srollout@mozilla.org\":{\"d\":\"/usr/lib/firefox/browser/features/e10srollout@mozilla.org.xpi\",\"e\":false,\"v\":\"1.2\",\"st\":1474325282000},\"webcompat@mozilla.org\":{\"d\":\"/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi\",\"e\":true,\"v\":\"1.0\",\"st\":1474325282000},\"firefox@getpocket.com\":{\"d\":\"/usr/lib/firefox/browser/features/firefox@getpocket.com.xpi\",\"e\":true,\"v\":\"1.0.4\",\"st\":1474325282000}},\"app-global\":{\"{972ce4c6-7e08-4474-a285-3208198ce6fd}\":{\"d\":\"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi\",\"e\":true,\"v\":\"49.0\",\"st\":1474325282000}},\"app-system-share\":{\"ubufox@ubuntu.com\":{\"d\":\"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ubufox@ubuntu.com.xpi\",\"e\":true,\"v\":\"3.2\",\"st\":1442597111000}}}");
user_pref("extensions.xpiState", "{\"app-system-addons\":{\"e10srollout@mozilla.org\":{\"d\":\"/home/ubuntu/.mozilla/firefox/yncyd31n.default/features/{1cc1c36d-e330-42fe-8a48-6322ee32262e}/e10srollout@mozilla.org.xpi\",\"e\":true,\"v\":\"1.3\",\"st\":1476544192000}},\"app-system-defaults\":{\"e10srollout@mozilla.org\":{\"d\":\"/usr/lib/firefox/browser/features/e10srollout@mozilla.org.xpi\",\"e\":false,\"v\":\"1.2\",\"st\":1474325282000},\"webcompat@mozilla.org\":{\"d\":\"/usr/lib/firefox/browser/features/webcompat@mozilla.org.xpi\",\"e\":true,\"v\":\"1.0\",\"st\":1474325282000},\"firefox@getpocket.com\":{\"d\":\"/usr/lib/firefox/browser/features/firefox@getpocket.com.xpi\",\"e\":true,\"v\":\"1.0.4\",\"st\":1474325282000}},\"app-global\":{\"{972ce4c6-7e08-4474-a285-3208198ce6fd}\":{\"d\":\"/usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi\",\"e\":true,\"v\":\"49.0\",\"st\":1474325282000}},\"app-system-share\":{\"ubufox@ubuntu.com\":{\"d\":\"/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/ubufox@ubuntu.com.xpi\",\"e\":true,\"v\":\"3.2\",\"st\":1442597111000}}}");
user_pref("media.gmp-gmpopenh264.abi", "x86_64-gcc3");
user_pref("media.gmp-gmpopenh264.lastUpdate", 1476543775);
user_pref("media.gmp-gmpopenh264.version", "1.6");

View File

@ -0,0 +1,102 @@
[Desktop Entry]
Name=HexChat
Name[de]=HexChat
Name[en_GB]=HexChat
Name[es]=HexChat
Name[et]=HexChat
Name[eu]=HexChat
Name[fi]=HexChat
Name[fr]=HexChat
Name[it]=HexChat
Name[ja_JP]=HexChat
Name[ko]=
Name[lt]=HexChat
Name[pl]=HexChat
Name[pt]=HexChat
Name[pt_BR]=HexChat
Name[sq]=HexChat
Name[sv]=HexChat
Name[tr]=HexChat
Name[zh_CN]=HexChat
GenericName=IRC Client
GenericName[de]=IRC-Client
GenericName[en_GB]=IRC Client
GenericName[es]=Cliente de IRC
GenericName[et]=IRC klient
GenericName[eu]=IRC bezeroa
GenericName[fi]=IRC-asiakassovellus
GenericName[fr]=Client IRC
GenericName[it]=Client IRC
GenericName[ja_JP]=IRC
GenericName[ko]=IRC
GenericName[lt]=IRC klientas
GenericName[pl]=Klient IRC
GenericName[pt]=Cliente IRC
GenericName[pt_BR]=Cliente IRC
GenericName[sq]=Klient IRC
GenericName[sv]=IRC klient
GenericName[tr]=IRC Client
GenericName[zh_CN]=IRC
Comment=Chat with other people online
Comment[de]=Chatte online mit anderen Leuten
Comment[en_GB]=Chat with other people online
Comment[es]=Chatea con otras personas en línea
Comment[et]=Vestle teiste kasutajatega internetis
Comment[fi]=Keskustele muiden kanssa verkossa
Comment[fr]=Parlez avec d'autres personnes en ligne
Comment[it]=Chiacchiera con altri utenti online
Comment[ja_JP]=
Comment[ko]=
Comment[lt]=Kalbėkite su kitais prisijungusiais žmonėmis
Comment[pl]=Rozmawiaj z innymi ludźmi przez internet
Comment[pt]=Conversa com outras pessoas online
Comment[pt_BR]=Converse com outras pessoas na rede
Comment[sq]=Bisedoni në linjë me persona të tjerë
Comment[sv]=Chatta med andra människor online
Comment[tr]=İnsanlar ile çevrimiçi sohbet
Comment[zh_CN]=线
Keywords=IM;Chat;
Keywords[de]=IM;Chat;
Keywords[en_GB]=IM;Chat;
Keywords[es]=IM;Chat;
Keywords[eu]=IM;Chat;Txat;
Keywords[fi]=IM;Chat;pikaviestin;keskustelu;
Keywords[fr]=IM;Chat;
Keywords[it]=IM;Chat;Messaggistica Istantanea;IRC;
Keywords[ko]=IM; ;Chat;;
Keywords[lt]=IM;Pokalbiai;
Keywords[pl]=IM;Chat;
Keywords[pt]=IM;Chat;
Keywords[pt_BR]=IM;Chat;
Keywords[sq]=IM;Fjalosje;
Keywords[tr]=IM;Chat;
Keywords[zh_CN]=IM;;
Exec=hexchat %U
Icon=hexchat
Terminal=false
Type=Application
Categories=GTK;Network;IRCClient;
StartupNotify=true
X-GNOME-UsesNotifications=true
MimeType=x-scheme-handler/irc;x-scheme-handler/ircs;
Actions=SafeMode;
[Desktop Action SafeMode]
Name=Open Safe Mode
Name[de]=Im sicheren Modus öffnen
Name[en_GB]=Open Safe Mode
Name[es]=Abrir en modo seguro
Name[et]=Ava turvarežiim
Name[fr]=Ouvrir le mode sans échec
Name[it]=Apri modalità sicura
Name[ja_JP]=
Name[ko]=
Name[lt]=Atviras saugus režimas
Name[pl]=Otwórz tryb bezpieczny
Name[pt]=Abrir Modo Seguro
Name[pt_BR]=Abrir modo seguro
Name[sq]=Hap Mënyrën e Sigurt
Name[sv]=Öppna säkert läge
Name[tr]=Güvenli Modda Aç
Name[zh_CN]=
Exec=hexchat --no-auto --no-plugins

View File

@ -1,25 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Name=XChat IRC
Name[zh_TW]=
Comment[de]=IRC-Client
Comment[es]=Aplicación de IRC
Comment[fi]=IRC-sovellus
Comment[fr]=Client IRC
Comment[hu]=IRC-kliens
Comment[lt]=IRC klientas
Comment[no]=IRC-klient
Comment[pt_BR]=Cliente de IRC
Comment[sl]=Odjemalec IRC
Comment[sv]=IRC-klient
Comment[ro]=Client de IRC
Comment[zh_TW]=X-Chat
Comment=Chat with other people using Internet Relay Chat
Exec=sh -c "xchat --existing --url %U || exec xchat"
Icon=xchat
Terminal=false
Type=Application
Categories=Network;
StartupNotify=true
MimeType=x-scheme-handler/irc;x-scheme-handler/ircs;
Name[en]=IRC

View File

@ -1,11 +1,13 @@
[[local|localrc]]
# HOST_IP=192.168.50.4
Q_AGENT=linuxbridge
LB_PHYSICAL_INTERFACE=eth0
PUBLIC_PHYSICAL_NETWORK=default
LB_INTERFACE_MAPPINGS=default:eth0
# Required for Virtualbox standard 'Nat' networking, since devstack cannot
# determine host ip address
HOST_IP=10.0.2.15
# This line will be uncommented at the end of devstack setup so that starting up
# the VM again would not require high network bandwith to check and install
# packages
#OFFLINE=True
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD

View File

@ -28,3 +28,6 @@ sudo apt clean
sudo cp -ar "$REPO/files/etc" /
sudo cp -ar "$REPO/files/home" /
sudo chown -R "$USER:$GROUP" /home/
# Set password
echo "$USER:openstack" | sudo chpasswd

View File

@ -10,5 +10,7 @@ sudo apt install -y lightdm lightdm-gtk-greeter \
# Install basic GUI applications
sudo apt install -y firefox xfce4-terminal xfce4-whiskermenu-plugin \
vim-gtk geany hexchat
# Configure virtualbox GUI
sudo apt install -y virtualbox-guest-dkms virtualbox-guest-x11
sudo apt clean