Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#12: First working containerization setup.
- Loading branch information
1 parent
21b23f9
commit 124454e
Showing
18 changed files
with
128 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# The full path to this script, no matter where it is called from | ||
SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
|
||
if [ ! -e docker ] | ||
then | ||
echo "You need to install Docker in order to boot the JourneyMonitor docker infrastructure" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d ${SCRIPTDIR}/../../control ] || [ ! -d ${SCRIPTDIR}/../../monitor ] | ||
then | ||
echo "This script expects checkouts of the 'control' and 'monitor' modules at the same level as this 'infra' checkout." | ||
exit 1 | ||
fi | ||
|
||
if [ -z $(docker images -q journeymonitor/control:latest 2> /dev/null) ] | ||
then | ||
echo "Image 'journeymonitor/control:latest' doesn't exist, creating..." | ||
/usr/bin/env bash ${SCRIPTDIR}/../../control/docker/build-app-container.sh | ||
fi | ||
|
||
if [ -z $(docker images -q journeymonitor/monitor:latest 2> /dev/null) ] | ||
then | ||
echo "Image 'journeymonitor/monitor:latest' doesn't exist, creating..." | ||
/usr/bin/env bash ${SCRIPTDIR}/../../monitor/docker/build-app-container.sh | ||
fi | ||
|
||
docker network create journeymonitor 2> /dev/null || true | ||
|
||
echo "Starting image 'journeymonitor/control:latest' as container 'journeymonitor-control'" | ||
/usr/bin/env bash ${SCRIPTDIR}/../../control/docker/run-app-container.sh | ||
|
||
echo "Starting image 'journeymonitor/monitor:latest' as container 'journeymonitor-monitor'" | ||
/usr/bin/env bash ${SCRIPTDIR}/../../monitor/docker/run-app-container.sh | ||
|
||
echo "All done." | ||
echo "If you need a shell on one of the containers, go to the project folder (e.g. '../control') and issue 'make docker-shell'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
classes: | ||
- base | ||
- unattended-upgrades | ||
- simplecd | ||
- user-root | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
env: dev | ||
role: control-app-container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
env: dev | ||
role: monitor-app-server | ||
role: monitor-app-container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
classes: | ||
- base | ||
- postfix | ||
- spark-master | ||
- app-analyze | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
classes: | ||
- base | ||
- postfix | ||
- spark-slave | ||
- cassandra | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
classes: | ||
- base | ||
- selenium | ||
- browsermob-proxy | ||
- php5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
classes: | ||
- base-minimal | ||
- base | ||
- php5 | ||
- composer | ||
- user-journeymonitor | ||
- nodejs | ||
- bower | ||
- cronjobs | ||
- postfix | ||
- nginx | ||
|
||
applications: | ||
- control |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
classes: | ||
- base | ||
- php5 | ||
- composer | ||
- user-journeymonitor | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
classes: | ||
- base-minimal | ||
- selenium | ||
- browsermob-proxy | ||
- php5 | ||
- composer | ||
- user-journeymonitor | ||
- cronjobs | ||
- postfix | ||
- nginx | ||
- jre7 | ||
- jre8 | ||
- app-monitor | ||
|
||
applications: | ||
- monitor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
classes: | ||
- base | ||
- selenium | ||
- browsermob-proxy | ||
- php5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class base-minimal { | ||
|
||
package { | ||
[ "vim", | ||
"unzip", | ||
"git", | ||
"sqlite", | ||
"curl", | ||
"make", | ||
"software-properties-common" # for add-apt-repository | ||
]: | ||
ensure => present, | ||
require => [ Exec["apt-get update"] ], | ||
} | ||
|
||
file { ["/opt/puppet", "/opt/puppet/install", "/opt/puppet/flags"]: | ||
ensure => "directory", | ||
owner => "root", | ||
group => "root", | ||
mode => 0755, | ||
} | ||
|
||
exec { "apt-get update": | ||
command => "/usr/bin/apt-get update", | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,20 @@ | ||
class base { | ||
|
||
include base-minimal | ||
|
||
package { | ||
[ "openssh-server", | ||
"ethtool", | ||
"tcpdump", | ||
"vim", | ||
"htop", | ||
"iotop", | ||
"sysstat", | ||
"acpid", | ||
"unzip", | ||
"bwm-ng", | ||
"make", | ||
"g++", | ||
"curl", | ||
"sqlite", | ||
"git", | ||
"software-properties-common" # for add-apt-repository | ||
"g++" | ||
]: | ||
ensure => present, | ||
require => Exec["apt-get update"], | ||
} | ||
|
||
file { ["/opt/puppet", "/opt/puppet/install", "/opt/puppet/flags"]: | ||
ensure => "directory", | ||
owner => "root", | ||
group => "root", | ||
mode => 0755, | ||
} | ||
|
||
exec { "apt-get update": | ||
command => "/usr/bin/apt-get update", | ||
require => [ Class["base-minimal"], Exec["apt-get update"] ] | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters