/!\ IMPORTANT: this is a hands-on tutorial: participants are expected bring a laptop and pre-install software in advance to make the best use of time during the tutorial.
If for some reason you are unable to fulfill this pre-requisite, try to seat close to an attendee that is able to perform these tasks.
Note: in the following instructions, terminal commands are prefixed by a virtual prompt
$>which obviously does not belong to the command.
Create in advance the various accounts for the cloud services we will use, i.e.:
Install the following software, depending on your running platform:
|Mac OS||Homebrew||The missing package manager for macOS||
|Mac OS||Brew Cask Plugin||Mac OS Apps install made easy||
|Mac OS||iTerm2||(optional) enhanced Terminal|
|Windows||Git for Windows||I'm sure you guessed|
|Windows||SourceTree||(optional) enhanced git GUI|
|Windows/Linux||Virtual Box||Free hypervisor provider for Vagrant|
|Windows/Linux||Vagrant||Reproducible environments made easy.|
|Windows||Docker for Windows||Lightweight Reproducible Containers|
- Follow the below custom instructions depending on your running platform
Mac OS X
Now that you have Homebrew installed:
$> brew install git-core git-flow # (newer) Git stuff $> brew tap caskroom/cask # install brew cask -- see https://caskroom.github.io/ $> brew cask install virtualbox # install virtualbox -- see https://www.virtualbox.org/ $> brew cask install vagrant # install Vagrant -- see https://www.vagrantup.com/downloads.html $> brew cask install vagrant-manager # see http://vagrantmanager.com/ $> brew cask install docker # install Docker -- https://docs.docker.com/engine/installation/mac/
Use your distribution package manager to install the appropriate packages for Vagrant:
If you are running Ubuntu / Debian:
$> sudo apt-get install git-flow rubygems virtualbox vagrant virtualbox-dkms
If you are running CentOS / RedHat / Fedora
$> sudo yum install git gitflow
For the rest, it's a little more tricky:
#== CentOS / RedHat == # Add Required Yum Repositories $> cd /etc/yum.repos.d # For CentOS/RHEL Systems: $> sudo wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo # For Fedora Systems: $> wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo # For CentOS/RHEL 7, 64 Bit (x86_64): add EPEL yum repository $> rpm -Uvh http://epel.mirror.net.in/epel/7/x86_64/e/epel-release-7-8.noarch.rpm # CentOS/RHEL 6, 64 Bit (x86_64): add EPEL yum repository $> rpm -Uvh http://epel.mirror.net.in/epel/6/x86_64/epel-release-6-8.noarch.rpm # Install required packages $> yum install gcc make patch dkms qt libgomp kernel-headers kernel-devel fontforge binutils glibc-headers glibc-devel # Setup Environment Variable as VirtualBox installation required kernel source code to install required modules $> export KERN_DIR=/usr/src/kernels/2.6.32-504.3.3.el6.x86_64 # Adapt accordingly from 'uname -a' $> yum install VirtualBox-5.1 # After installation we need to rebuild kernel modules $> service vboxdrv setup
Check that you can run
- For Docker, choose your distribution from https://docs.docker.com/engine/installation/linux/ and follow the instructions. You need a reasonably new kernel version (3.10 or higher).
On Windows (10, 7/8 should also be OK) you should download and install the following tools:
First, install VirtualBox with the default settings. Note that a warning will be issued that your network connections will be temporarily impacted, you should continue. Then, run the downloaded extension pack (.vbox-extpack file), it will open within the VirtualBox Manager and you should let it install normally.
Proceed with the installation, no changes are required to the default setup.
The Git installation requires a few changes to the defaults, make sure the following are selected in the installer:
- Select Components: Use a TrueType font in all console windows)
- Adjusting your PATH environment: Use Git and optional Unix tools from the Windows Command Prompt
- Configuring the line ending conversions: Checkout Windows-style, commit Unix-style line endings)
- Configuring the terminal emulator to use with Git Bash: Use MinTTY (the default terminal of MSYS2)
- Configuring extra options: Enable symbolic links
Please note that to clone a Git repository which contains symbolic links (symlinks), you must start a shell (Microsoft PowerShell in this example, but a Command Prompt - cmd.exe - or Git Bash shell should work out fine) with elevated (Administrator) privileges. This is required in order for git to be able to create symlinks on Windows:
- Start Powershell:
- In the Windows Start menu, type PowerShell
- Normally PowerShell will appear as the first option on the top as Best match
- Right click on it and select "Run as administrator"
A PowerShell window will appear and you can type your commands in it, e.g.:
cd $HOME git --version vagrant --version
- Optional - Docker:
- As a fallback solution for older version of Windows (or Mac OS), you can use the Docker Toolbox: https://docs.docker.com/engine/installation/windows/#/docker-for-windows. It uses VirtualBox instead of the Linux native virtualization technologies.
(Eventually) Make yourself known to Git
$> git config –-global user.name "Firstname LastName" # Adapt accordingly $> git config –-global user.email "Firstname.LastName@domain.org" # Adapt with your mail
Clone the tutorial repository from a Terminal (Powershell as
administrator under windows):
$> git clone https://github.com/Falkor/RR-tutorials.git $> cd RR-tutorials $> make setup # Under Mac OS / Linux
At the root of the
RR-tutorials/ directory, you should have a
- check it and ensure that the vagrant command-line is operational:
$> ls LICENSE Makefile README.md VERSION Vagrantfile docs mkdocs.yml slides $> vagrant --version Vagrant 1.9.1
- let it download the vagrant boxes used for this tutorial in the background while you listen to the keynote ;)
$> vagrant up # From the [freshly cloned] root directory of the RR-tutorials repository
/!\ IMPORTANT: downloading the configured images (~500MB) takes some time (~10 min). Depending on the number of participants of this tutorial, it may be necessary (and faster) to upload the box directly from a USB stick the technical support team will have prepared.
$> vagrant box add RR-tutorials /path/to/usb/ubuntu-trusty64-RR.box # define local box 'RR-tutorials' $> sed -i "s/svarrette\///" Vagrantfile # Remove 'svarrette/' prefix in Vagrantfile
As there may be connection
In parallel, check that Docker works:
$> docker info Containers: 9 Running: 0 Paused: 0 Stopped: 9 Images: 12 Server Version: 1.12.3 [...]
- Pull the docker containers we will need for the second part of this tutorial
$> docker pull ubuntu:14.04
- Login onto you Docker hub account (take note of your Docker Hub ID and password).
- With docker installed, run
$ docker login -u <your docker hub ID>
and enter your password.
Note that if the Docker installation fails, you can use http://play-with-docker.com/ to try Docker, but it won't work if all of us try it once! So use it only as a last resort, and it is up to you to use any important information (like the Docker hub account) inside it.