Reorganized install and configuration scripts. Memory is now 5GB. Updated README
This commit is contained in:
parent
d9912aeabb
commit
f855045bd9
83
README.md
83
README.md
@ -1,20 +1,43 @@
|
||||
OpenStack upstream training virtual environment
|
||||
===============================================
|
||||
|
||||
This repository contains a Vagrant-based devstack setup. It installs the
|
||||
necessary components in an Ubuntu machine along with basic GUI features to be
|
||||
able to start hacking on OpenStack.
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Usage
|
||||
-----
|
||||
### What's this?
|
||||
|
||||
There is a prebuilt appliance, ready to use. [Download it from here](
|
||||
https://s3.eu-central-1.amazonaws.com/openstack-training/devstack-vm.ova).
|
||||
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
|
||||
[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)
|
||||
* [VirtualBox](https://www.virtualbox.org/)
|
||||
* Recent CPU with at least 4 cores
|
||||
|
||||
### What do I want?
|
||||
|
||||
| A prebuilt image | I want to build myself |
|
||||
| ---------------- | ---------------------- |
|
||||
| Takes 15 minutes | Takes 45-60 minutes |
|
||||
| [Instructions][#using-a-prebuilt-image] | [Instructions][#building-your-own] |
|
||||
| [Download image][image] | |
|
||||
|
||||
[image]: https://s3.eu-central-1.amazonaws.com/openstack-training/devstack-vm.ova
|
||||
|
||||
Instructions
|
||||
------------
|
||||
|
||||
### Using a prebuilt image
|
||||
|
||||
1. Set up VirtualBox
|
||||
2. Import the `ova` file (`File` -> `Import appliance...`)
|
||||
3. Start up the VM
|
||||
4. Open a terminal and start devstack
|
||||
2. Download the [pre-built image][image]
|
||||
3. Import the `ova` file (`File` -> `Import appliance...`)
|
||||
4. Start up the VM
|
||||
5. Open a terminal and start devstack
|
||||
|
||||
cd /opt/devstack
|
||||
./stack.sh
|
||||
@ -24,29 +47,7 @@ https://s3.eu-central-1.amazonaws.com/openstack-training/devstack-vm.ova).
|
||||
appliance.
|
||||
|
||||
|
||||
Screenshots
|
||||
-----------
|
||||
|
||||
Devstack running
|
||||
![Devstack running](docs/01.png "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")
|
||||
|
||||
|
||||
Building the Virtual Machine
|
||||
----------------------------
|
||||
|
||||
You can either use vagrant to set up the environment, roll your own VirtualBox
|
||||
image or just follow the installation script to manually set up devstack.
|
||||
|
||||
### Using Vagrant
|
||||
|
||||
This method actually sets up everything including devstack. It takes a fair
|
||||
amount of time (more than 30 minutes based on the internet connection)
|
||||
### Building your own
|
||||
|
||||
1. Set up VirtualBox
|
||||
2. Set up Vagrant
|
||||
@ -54,6 +55,8 @@ amount of time (more than 30 minutes based on the internet connection)
|
||||
4. `cd openstack-training-virtual-environment`
|
||||
5. `vagrant up`
|
||||
6. `vagrant reload`
|
||||
7. Follow [instructions for the prebuilt image](#using-a-prebuilt-image) from
|
||||
step 4
|
||||
|
||||
### Roll your own image
|
||||
|
||||
@ -69,9 +72,19 @@ and then creates the distributable box file.
|
||||
[install-devstack.sh](install-devstack.sh) - commands used during provisioning
|
||||
* [files/](files/) - configuration files copied into the vm
|
||||
|
||||
Screenshots
|
||||
-----------
|
||||
|
||||
Devstack running
|
||||
![Devstack running](docs/01.png "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")
|
||||
|
||||
License
|
||||
-------
|
||||
MIT
|
||||
|
||||
|
||||
|
||||
|
16
Vagrantfile
vendored
16
Vagrantfile
vendored
@ -2,18 +2,20 @@ Vagrant.configure(2) do |config|
|
||||
config.vm.hostname = "training"
|
||||
config.vm.box = "ubuntu/trusty64"
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.memory = "4096"
|
||||
vb.memory = "5120"
|
||||
vb.cpus = 2
|
||||
vb.name = "devstack-training"
|
||||
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
||||
vb.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
|
||||
end
|
||||
config.vm.provision :file, source: "files/home", destination: "/"
|
||||
config.vm.provision :shell, path: "install-base.sh", privileged: false,
|
||||
keep_color: true
|
||||
config.vm.provision :shell, path: "install-devstack.sh", privileged: false,
|
||||
keep_color: true
|
||||
config.vm.provision :shell, inline: "/vagrant/install-base.sh",
|
||||
privileged: false, keep_color: true
|
||||
config.vm.provision :shell, inline: "/vagrant/install-gui.sh",
|
||||
privileged: false, keep_color: true
|
||||
# config.vm.provision :shell, inline: "/vagrant/install-devstack.sh",
|
||||
# privileged: false, keep_color: true
|
||||
config.vm.provision :shell, inline: "/vagrant/configure-vagrant.sh",
|
||||
privileged: false, keep_color: true
|
||||
config.vm.box_check_update = false
|
||||
config.ssh.forward_x11 = true
|
||||
config.vm.synced_folder File.expand_path('~'), '/home/vagrant/host'
|
||||
end
|
||||
|
4
configure-vagrant.sh
Executable file
4
configure-vagrant.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Enable shared folder access
|
||||
sudo adduser vagrant vboxsf
|
26
install-base.sh
Normal file → Executable file
26
install-base.sh
Normal file → Executable file
@ -2,8 +2,10 @@
|
||||
# TODO: select local server for updates
|
||||
APT_MIRROR=http://mirror.switch.ch/ftp/mirror
|
||||
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
REPO=$(dirname "$(readlink -f "$0")")/
|
||||
|
||||
sudo sed -i "s@http://archive.ubuntu.com@$APT_MIRROR@g" /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade -y
|
||||
@ -14,23 +16,15 @@ sudo /usr/share/debconf/fix_db.pl
|
||||
sudo dpkg-reconfigure dictionaries-common
|
||||
sudo apt-get dist-upgrade -y
|
||||
|
||||
# Set up a desktop environment
|
||||
sudo apt-get install -y xfce4
|
||||
sudo apt-get install -y lightdm lightdm-gtk-greeter \
|
||||
--no-install-recommends --no-install-suggests
|
||||
# Install basic GUI applications
|
||||
sudo apt-get install -y firefox xfce4-terminal xfce4-whiskermenu-plugin \
|
||||
vim-gtk geany xchat
|
||||
# Install basic TUI applications
|
||||
sudo apt-get install -y htop mc tmux
|
||||
# Install git workflow related software
|
||||
sudo apt-get install -y git gitk git-gui git-review tig
|
||||
|
||||
# Install basic TUI applications
|
||||
sudo apt-get install -y htop mc tmux
|
||||
|
||||
sudo apt-get clean
|
||||
|
||||
# Enable shared folder access
|
||||
sudo adduser vagrant vboxsf
|
||||
|
||||
# Copy global configs (/etc)
|
||||
# (autologin, swap creation and deletion, etc.)
|
||||
sudo cp -ar /vagrant/files/etc /
|
||||
# Copy configs
|
||||
sudo cp -ar "$REPO/files/etc" /
|
||||
sudo cp -ar "$REPO/files/home" /
|
||||
sudo chown -R "$USER:$GROUP" /home/
|
||||
|
19
install-devstack.sh
Normal file → Executable file
19
install-devstack.sh
Normal file → Executable file
@ -1,12 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
REPO=$(dirname "$(readlink -f "$0")")/
|
||||
|
||||
# Install devstack
|
||||
DIR_DEVSTACK=/opt/devstack
|
||||
sudo mkdir $DIR_DEVSTACK
|
||||
sudo git clone https://git.openstack.org/openstack-dev/devstack $DIR_DEVSTACK
|
||||
sudo cp -ar /vagrant/files/opt /
|
||||
sudo chown -R vagrant:vagrant $DIR_DEVSTACK
|
||||
sudo chown -R vagrant:vagrant /opt/stack
|
||||
$DIR_DEVSTACK/stack.sh
|
||||
sudo mkdir /opt/devstack
|
||||
sudo chown -R "$USER:$GROUP" /opt/devstack
|
||||
|
||||
git clone https://git.openstack.org/openstack-dev/devstack /opt/devstack
|
||||
cp -ar "$REPO/files/opt" /
|
||||
|
||||
# sudo chown -R "$USER:$GROUP" /opt/devstack
|
||||
# sudo chown -R "$USER:$GROUP" /opt/stack
|
||||
|
||||
/opt/devstack/stack.sh
|
||||
|
||||
sudo apt-get clean
|
||||
|
13
install-gui.sh
Executable file
13
install-gui.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Set up a desktop environment
|
||||
sudo apt-get install -y xfce4
|
||||
sudo apt-get install -y lightdm lightdm-gtk-greeter \
|
||||
--no-install-recommends --no-install-suggests
|
||||
# Install basic GUI applications
|
||||
sudo apt-get install -y firefox xfce4-terminal xfce4-whiskermenu-plugin \
|
||||
vim-gtk geany xchat
|
||||
|
||||
sudo apt-get clean
|
Loading…
Reference in New Issue
Block a user