Skip to content
Snippets Groups Projects
Commit e4cf19bd authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

Merge branch '2-create-a-readme' into 'master'

Resolve "Create a README"

Closes #2

See merge request openappstack/bootstrap!2
parents 8f0d040b 6155b630
Branches
Tags
No related merge requests found
# OpenAppStack bootstrap script
This collection of scripts allows you to easily set up a new OpenAppStack cluster.
As part of the bootstrap process a special control shell is installed (in the form of
a Docker image) which contains utilities to manage your cluster.
## Prerequisites
We assume a single-node setup for now.
You need to have ssh access to the root account of the machine that will run
your cluster.
## Bootstrapping a new cluster
To run the bootstrap process:
```
./bootstrap $SERVER_IP
```
where `$SERVER_IP` is the ip address of the machine. (This address will also be
stored in the cluster configuration and is used by the Traefik ingress
controller, so even though using a domain name instead of an ip address may
work at first, that is not recommended.)
The bootstrap script will fire up your text editor to let you specify some
basic configuration parameters that are needed to set up your cluster. When
you're done editing, save and exit your editor, and the bootstrap process will
continue.
## Managing an existing cluster
The OpenAppStack project has created a special "control shell", a Docker
container that you can run to perform administrative tasks on your cluster.
Some programs that you can run from this shell:
* `kubectl` is the Kubernetes control program. For example, run
`kubectl get pod` to see a list of pods that currently exist in your cluster.
Run `kubectl --help` for help.
* `helm` is the "Kubernetes package manager". Use `helm ls` to see what apps are
installed in your cluster. You can also use it to perform manual upgrades;
see `helm --help`.
* `helmfile` is a high-level tool to manage your app installations. For example,
run `helmfile -e oas diff` to view the differences between what's currently
installed and what should be installed according to the OpenAppStack
installation plan.
To start the control shell, run
```
./manage $SERVER_IP
```
where `$SERVER_IP` is the address of the machine running your cluster.
......@@ -10,20 +10,20 @@ fi
prepareNode()
{
ssh "root@${host}" "bash -s" -- "$host" <prepare-node.sh
ssh "root@${host}" "bash -s" -- "$host" <"scripts/prepare-node.sh"
}
getControl()
{
ssh "root@${host}" "bash -s" -- <get-control.sh
scp "./control-shell.sh" "root@${host}:/oas/bin/control-shell.sh"
scp "./scripts/control-shell.sh" "root@${host}:/oas/bin/control-shell.sh"
}
configure()
{
echo "You now need to edit some basic settings that apply to many"
echo "applications."
cp "./local.yaml.template" "./local.yaml"
cp "./templates/local.yaml.template" "./local.yaml"
sed -i "s/\$IP/${host}/" "./local.yaml"
reconfigure
}
......@@ -36,7 +36,7 @@ reconfigure()
setup()
{
ssh -t "root@${host}" "CONTROL=bootstrap /bin/bash --init-file /oas/bin/control-shell.sh"
ssh -t "root@${host}" "CONTROL=bootstrap /bin/bash --init-file /oas/bin/control-shell.sh -c exit"
}
# No specific phase given, so just do everything that's necessary.
......
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment