12 Commits

Author SHA1 Message Date
Roger Luethi
92003cdb16 labs: make TOP_DIR more robust with blanks in path
Make TOP_DIR more robust when blanks are part of the TOP_DIR path.

Change-Id: I868e3406f358da24049d1e1bdbb4a8197f294a63
2015-03-15 11:29:48 +01:00
sayalilunkad
05676783f2 Modifies osbash files to use osbash ssh keys
This patch makes use of the osbash public and private keys to ssh to VM
rather than the vagrant keys.

This also removes the vagrant keys directory from the repository.

Change-Id: I939274f188a02469c7e2cf9f9502510ea00d514e
2015-03-09 13:49:52 +00:00
Roger Luethi
95f1962264 labs: install private ssh key, too
In addition to the public Vagrant insecure ssh key, install the private
one, too. Once in the VM, the private key can be used for connections to
other VMs.

Change-Id: If99fd29099749bf8224f449f5884399eebdef6ce
2014-10-03 14:19:00 +02:00
Roger Luethi
e87bc6f92a labs: rewrite enable_vagrant_ssh_keys.sh
Split the code into two functions:

get_vagrant_key: download a Vagrant insecure key (if necessary) and copy
it to ~/.ssh.

authorize_vagrant_key: authorize a Vagrant insecure key for logins into
the VM.

Change-Id: Id420aa14a48aac9e9c2814e0b4cdcbded90f0560
2014-10-03 10:38:53 +02:00
Roger Luethi
b1cdd3679a labs: set errexit and no nounset for client scripts
Use bash options to have client scripts exit with an error if any
command returns an error (errexit) or if an unset variable is used
(nounset).

Fix those scripts that would otherwise fail due to this change.

Change-Id: I23336bcb5227e884eaf6dd6e9eb5cb0fc24977cc
2014-09-29 08:15:28 +02:00
Roger Luethi
3f1ef07fdd labs: osbashauto exit on script error
Make osbashout abort if a client-side scripts returns an error; use a
file named error in the status directory to signal the problem and to
store the name of the offending script for use by Windows batch scripts.

Have osbash.sh and the Windows batch scripts exit when an error file
appears.

Change-Id: I6722e75c9c23b99e5ed25b00429026c2e0ff6a12
2014-09-14 10:55:40 +02:00
Roger Luethi
5a046b1200 labs: add osbash/shutdown.sh symlink
The recent changeset that added an "osbash shutdown.sh" line to
config/scripts.* was missing the symlink that makes the line work.

This patch adds the necessary symbolic link to the repo.

Change-Id: Ife4e1e2cbe2cca8c2eda34e5432c81db6284a24f
2014-08-20 21:10:20 +02:00
Roger Luethi
49541b99cb Adjust permissions
This changeset
- removes executable bits from README.md
- adds executable bits to shell scripts

These changes are largely symbolic, except for osbash.sh which users are
expected to run without having to change permissions or passing it as an
argument to bash.

Partial-Bug: 1312764
Implements: blueprint openstack-training-labs
Change-Id: I91cce85862171a360c31e1e7628a708dfefd70f1
2014-06-18 13:26:10 +02:00
Roger Luethi
cb6b1470f9 Add osbash helper scripts
This changeset adds two simple helper scripts.

base_fixups.sh is run on every basedisk while it is built. The script
can be used to fix whatever is necessary to make the basedisk work.
Right now, all it does is remove 70-persistent-net.rules which (if left
untouched) would result in a network interface order that would differ
from Vagrant's.

The second script is a trivial debug helper that does nothing but wait
for the removal of a file it creates in /tmp. When the file is removed,
execution continues.

Partial-Bug: 1312764
Implements: blueprint openstack-training-labs
Change-Id: Id75a89ced5dcf132e91e7426df15436de585a203
2014-06-18 10:41:25 +02:00
Roger Luethi
bb6e4b9515 Allow osbash to enable Vagrant ssh keys
This script can be used to enable access to osbash VMs using the same
ssh key that is used to for logging into Vagrant VMs.

If the script is run from a directory shared with the host, the
downloaded key will be cached.

Partial-Bug: 1312764
Implements: blueprint openstack-training-labs
Change-Id: Ia541e01cabd69f794ea79d8a318f490f518d28ef
2014-06-18 09:45:47 +02:00
Roger Luethi
e5bb49333f Add init_xxx_node.sh
This script sets the hostname and configures networking in the node VM.
It gets the hostname from its own file name (which is appropriately set
by vm_build_node when copying the file).

Partial-Bug: 1312764
Implements: blueprint openstack-training-labs
Change-Id: I9d0daad40462202c42ddd3a591f93b23d9512d53
2014-06-17 18:24:40 +02:00
Roger Luethi
8c7bbe82be Enable autostart in osbash
This change enables autostart functionality for osbash.

activate_autostart is called by a minimal script written by
preseed/kickstart files (if configured).

It creates (and grants sudo privileges to) the osbash user if
that has not been done by preseed/kickstart.

It uses template-osbashauto to generate /etc/init.d/osbashauto and
configures the system to run the script immediately and during every
subsequent system boot.

osbashauto iterates over all files in the autostart directory (in the
VirtualBox shared folder; filled by osbash from the host side) and
executes them as the osbash user. It writes its log files into the log
directory in the shared folder.

Partial-Bug: 1312764
Implements: blueprint openstack-training-labs
Change-Id: I0394c5ea4e3f75a9d9bee30d119e047a762e86ce
2014-06-17 11:25:59 +02:00