Skip to content

Commit

Permalink
Merge pull request #217 from sielaq/master
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
sielaq committed May 18, 2016
2 parents a9a9560 + 04a3e49 commit 4b80708
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 20 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Build Status](https://travis-ci.org/eBayClassifiedsGroup/PanteraS.svg?branch=master)](https://travis-ci.org/eBayClassifiedsGroup/PanteraS)
[![Docker Hub](https://img.shields.io/badge/docker-ready-blue.svg)](https://hub.docker.com/r/panteras/paas-in-a-box/)
[![Current Release](http://img.shields.io/badge/release-0.2.2-blue.svg)](https://github.com/eBayClassifiedsGroup/PanteraS/releases/tag/v0.2.2)
[![Current Release](http://img.shields.io/badge/release-0.2.3-blue.svg)](https://github.com/eBayClassifiedsGroup/PanteraS/releases/tag/v0.2.3)

# PanteraS <br> _entire_ Platform as a Service, in a box
_"One container to rule them all"_
Expand Down Expand Up @@ -59,6 +59,10 @@ Depending on `MASTER` and `SLAVE` you can define role of the container
Mesos Slave | x | - | x |
Registrator| x | - | x |
dnsmasq| x | x | x |
Fabio | - | - | - |
Netdata | - | - | - |

(Last two require manual override `START_FABIO=true` )


## Requirements:
Expand Down Expand Up @@ -123,7 +127,7 @@ slavehost-n# docker-compose up -d
You can reach the PaaS components
on the following ports:

- HAproxy: http://hostname:81
- HAproxy / Fabio: http://hostname:81
- Consul: http://hostname:8500
- Chronos: http://hostname:4400
- Marathon: http://hostname:8080
Expand Down
2 changes: 1 addition & 1 deletion build-docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ TAG=${TAG:-"latest"}
IMAGE=${IMAGE:-"panteras/paas-in-a-box:${TAG}"}

docker build --rm=true --tag=${REGISTRY}${IMAGE} infrastructure || error_exit
docker tag -f ${REGISTRY}${IMAGE} ${IMAGE} || error_exit
docker tag ${REGISTRY}${IMAGE} ${IMAGE} || error_exit
13 changes: 9 additions & 4 deletions docker-compose.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ panteras:
${MARATHON_PORTS}
${MESOS_PORTS}
${CHRONOS_PORTS}
${NETDATA_PORTS}

environment:
CONSUL_IP: "${CONSUL_IP}"
Expand All @@ -17,21 +18,25 @@ panteras:
GOMAXPROCS: "${GOMAXPROCS}"

SERVICE_8500_NAME: consul-ui
SERVICE_8500_TAGS: haproxy
SERVICE_8500_TAGS: haproxy,urlprefix-consul-ui.service.consul/
SERVICE_8500_CHECK_HTTP: /v1/status/leader

SERVICE_8080_NAME: marathon
SERVICE_8080_TAGS: haproxy
SERVICE_8080_TAGS: haproxy,urlprefix-marathon.service.consul/
SERVICE_8080_CHECK_HTTP: /v2/leader

SERVICE_5050_NAME: mesos
SERVICE_5050_TAGS: haproxy
SERVICE_5050_TAGS: haproxy,urlprefix-mesos.service.consul/
SERVICE_5050_CHECK_HTTP: /master/health

SERVICE_4400_NAME: chronos
SERVICE_4400_TAGS: haproxy
SERVICE_4400_TAGS: haproxy,urlprefix-chronos.service.consul/
SERVICE_4400_CHECK_HTTP: /ping

SERVICE_19999_NAME: netdata
SERVICE_19999_TAGS: haproxy,urlprefix-netdata.service.consul/
SERVICE_19999_CHECK_HTTP: /version.txt

START_CONSUL: "${START_CONSUL}"
START_CONSUL_TEMPLATE: "${START_CONSUL_TEMPLATE}"
START_DNSMASQ: "${START_DNSMASQ}"
Expand Down
3 changes: 2 additions & 1 deletion generate_yml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ DNSMASQ_ADDRESS=${DNSMASQ_ADDRESS:-"--address=/consul/${CONSUL_IP}"}
KEEPALIVED_CONSUL_TEMPLATE="-template=./keepalived.conf.ctmpl:/etc/keepalived/keepalived.conf:./keepalived_reload.sh"

# Expose ports depends on which service has been mark to start
[ "${START_CONSUL_TEMPLATE}" == "true" ] && {
[ "${START_CONSUL_TEMPLATE}" == "true" ] || [ "${START_FABIO}" == "true" ] && {
[ "${START_CONSUL}" == "true" ] && PORTS="ports:" && CONSUL_UI_PORTS='- "8500:8500"'
[ "${START_MARATHON}" == "true" ] && PORTS="ports:" && MARATHON_PORTS='- "8080:8080"'
[ "${START_MESOS_MASTER}" == "true" ] && PORTS="ports:" && MESOS_PORTS='- "5050:5050"'
[ "${START_CHRONOS}" == "true" ] && PORTS="ports:" && CHRONOS_PORTS='- "4400:4400"'
[ "${START_NETDATA}" == "true" ] && PORTS="ports:" && NETDATA_PORTS='- "19999:19999"'
}

# Override docker with local binary
Expand Down
17 changes: 9 additions & 8 deletions infrastructure/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ ENV DOCKER_APP_VERSION 1.11.0-0~trusty
ENV CONSUL_APP_VERSION 0.6.4
ENV CONSUL_TEMPLATE_APP_VERSION 0.10.0
ENV HAPROXY_APP_VERSION 1.5.14-1ubuntu0.15.10.1~ubuntu14.04.1
ENV MESOS_APP_VERSION 0.28.0-2.0.16.ubuntu1404
ENV MARATHON_APP_VERSION 1.1.0-1.0.471.ubuntu1404
ENV MESOS_APP_VERSION 0.28.1-2.0.20.ubuntu1404
ENV MARATHON_APP_VERSION 1.1.1-1.0.472.ubuntu1404
ENV REGISTRATOR_APP_VERSION v7
ENV CHRONOS_APP_VERSION 2.4.0-0.1.20151007110204.ubuntu1404
ENV FABIO_APP_VERSION 1.1.2
ENV FABIO_APP_VERSION 1.1.3rc2

ENV DOCKER_HOST unix:///tmp/docker.sock

Expand Down Expand Up @@ -101,11 +101,8 @@ RUN sed -i 's/^# \(.*-backports\s\)/\1/g' /etc/apt/sources.list \
&& ln -s /usr/sbin/haproxy /usr/sbin/haproxy_b

# consul-template
#RUN wget https://github.com/hashicorp/consul-template/releases/download/v${CONSUL_TEMPLATE_APP_VERSION}/consul_template_${CONSUL_TEMPLATE_APP_VERSION}_linux_amd64.zip \
# && unzip consul_template_${CONSUL_TEMPLATE_APP_VERSION}_linux_amd64.zip
RUN wget https://github.com/hashicorp/consul-template/releases/download/v${CONSUL_TEMPLATE_APP_VERSION}/consul-template_${CONSUL_TEMPLATE_APP_VERSION}_linux_amd64.tar.gz \
&& tar zxf consul-template_${CONSUL_TEMPLATE_APP_VERSION}_linux_amd64.tar.gz \
&& ln -s consul-template_${CONSUL_TEMPLATE_APP_VERSION}_linux_amd64/consul-template .
RUN wget https://releases.hashicorp.com/consul-template/${CONSUL_TEMPLATE_APP_VERSION}/consul-template_${CONSUL_TEMPLATE_APP_VERSION}_linux_amd64.zip \
&& unzip consul-template_${CONSUL_TEMPLATE_APP_VERSION}_linux_amd64.zip

# HAPROXY config
#
Expand Down Expand Up @@ -184,6 +181,8 @@ RUN apt-get update \
autogen \
automake \
pkg-config \
uuid-dev \
libmnl-dev \
&& git clone https://github.com/firehol/netdata.git /tmp/netdata.git --depth=1 \
&& cd /tmp/netdata.git \
&& ./netdata-installer.sh --dont-wait --install /opt \
Expand All @@ -199,6 +198,8 @@ RUN apt-get update \
autogen \
automake \
pkg-config \
uuid-dev \
libmnl-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
12 changes: 10 additions & 2 deletions infrastructure/panteras.http
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ Content-Type: text/html
<div id="consul" class="col-md-6 hidden">
<a href="/" title="Service discovery"><img id="consul_p" width="32" height="32"/>Consul</a>
</div>
<div id="netdata" class="col-md-6 hidden">
<a href="/" title="Netdata monitoring"><img id="netdata_p" width="32" height="32"/>Netdata</a>
</div>
<div id="supervisord" class="col-md-6 hidden">
<a href="/" title="Processes status"><span class="glyphicon glyphicon-play" aria-hidden="true"></span>Supervisor</a>
</div>
Expand Down Expand Up @@ -136,6 +139,10 @@ Content-Type: text/html
id: 'mesos-master',
port: 5050
},
{
id: 'netdata',
port: 19999
},
];

links.forEach(function (link) {
Expand All @@ -148,8 +155,9 @@ Content-Type: text/html
});

document.getElementById('marathon_p').src = window.location.origin + ':8080/ui/img/marathon-favicon.ico';
document.getElementById('consul_p').src = window.location.origin + ':8500/ui/static/favicon.png';
document.getElementById('chronos_p').src = window.location.origin + ':4400/favicon.ico';
document.getElementById('consul_p').src = window.location.origin + ':8500/ui/static/favicon.png';
document.getElementById('chronos_p').src = window.location.origin + ':4400/favicon.ico';
document.getElementById('netdata_p').src = window.location.origin + ':19999/favicon.ico';

</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version 0.2.2
version 0.2.3
3 changes: 2 additions & 1 deletion provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

paas="PanteraS"
REPODIR=`dirname $0`
IMAGE="${REGISTRY}panteras/paas-in-a-box:latest"
export PANTERAS_IMAGE_TAG=$(awk '/version/{print $2}' ${REPODIR}/infrastructure/version)
IMAGE="${REGISTRY}panteras/paas-in-a-box:$PANTERAS_IMAGE_TAG"

usage(){
cat <<_END_
Expand Down

0 comments on commit 4b80708

Please sign in to comment.