1
0
mirror of /repos/dotTiddlywiki.git synced 2025-12-30 07:31:33 +01:00

boot2docker start

This commit is contained in:
Aiko Mastboom 2015-03-17 21:17:28 +01:00
parent 6b189a566a
commit 92c35ed946
3 changed files with 92 additions and 0 deletions

View File

@ -0,0 +1,20 @@
created: 20150317122424058
creator: user
modified: 20150317163202110
modifier: user
tags:
title: boot2docker brew
type: text/vnd.tiddlywiki
Install Virtualbox
* https://www.virtualbox.org/wiki/Downloads
Install Homebrew
```
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install boot2docker
```

View File

@ -0,0 +1,9 @@
created: 20150317162950327
creator: user
modified: 20150317163042312
modifier: user
tags:
title: boot2docker dmg
type: text/vnd.tiddlywiki
* http://boot2docker.io

View File

@ -0,0 +1,63 @@
created: 20150317163014131
creator: user
modified: 20150317174300850
modifier: user
tags:
title: bootstrap deploy2docker
type: text/vnd.tiddlywiki
! Install [[boot2docker brew]] or [[boot2docker dmg]]
```bash
boot2docker run
$(boot2docker shellinit)
```
! Clone cxp-ops repo
```bash
hg clone ssh://hg@git.informaat.com/projects/cxp-ops
cd cxp-ops
```
! Build ops_bootstrap image
```bash
docker build -t cxp-ops/ops_bootstrap .
```
You now have an image that is able to run the correct version of ansible.
! Building the base_image
Start the ops_bootstrap image and make sure it has access to your certificates and cxp-ops folder.
```bash
docker run --rm -it -v ${DOCKER_CERT_PATH}:/certs -v $(pwd):/root/ops cxp-ops/ops_bootstrap bash
```
Running `docker ps` inside the container should work. (if you run into version problems the Dockerfile for the ops_bootstrap needs updating and the bootstrap begins again with the ''Build ops_bootstrap image'' step.
Build the base_image:
```bash
cd /root/ops/docker/silo
docker build -t cxp-ops/base_image .
```
! Adding the opscentre to the base_image
In order for ansible to connect to your base_image a container needs to be started with an ssh server inside it.
```bash
cd /root/ops
./ninja_create my_docker_opscenctre
```
This creates a docker container and installs the opscentre in it.
```bash
CID=$(docker ps | grep base_image | cut -d ' ' -f 1)
docker commit -m "initial commit" ${CID} cxp-ops/opscentre
```