Environment
RHEL7.2
Marathon: 0.14.0
Mesos: 0.26.0
Docker-Engine: 1.10.3
Running a full-blown Mesos/Marathon ecosystem. Build docker-compose-executor without any problem. Copied the docker-compose-executor-0.0.1-SNAPSHOT-jar-with-dependencies.jar to Mesos-Slave, as well as docker-compose-executor.sh file.
Here are the docker-compose-executor.sh file:
File: docker-compose-executor.sh - on Mesos-Slave node
COMPOSE_JAR_NAME=/opt/docker-compose-executor/docker-compose-executor-0.0.1-SNAPSHOT-jar-with-dependencies.jar
COMPOSE_CLASS_NAME=com.paypal.mesos.executor.App
java -cp ${COMPOSE_JAR_NAME} ${COMPOSE_CLASS_NAME}
I am attempting to deploy Docker-Notary which comprises of three containers:
- Notary MySQL
- Notary Server
- Notary Signer
Here is my docker-compose.yml file:
File: docker-compose.yml
server:
build: .
dockerfile: server.Dockerfile
links:
- mysql
- signer
- signer:notarysigner
environment:
- SERVICE_NAME=notary_server
ports:
- "8080:18080"
- "4443:14443"
entrypoint: /bin/bash
command: -c "./migrations/migrate.sh && notary-server -config=fixtures/server-config.json"
signer:
build: .
dockerfile: signer.Dockerfile
links:
- mysql
environment:
- SERVICE_NAME=notary_signer
ports:
-"4444:14444"
entrypoint: /bin/bash
command: -c "./migrations/migrate.sh && notary-signer -config=fixtures/signer-config.json"
mysql:
volumes:
- ./notarymysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- notary_data:/var/lib/mysql
image: mariadb:10.1.10
ports:
- "3306:13306"
environment:
- TERM=dumb
- MYSQL_ALLOW_EMPTY_PASSWORD="true"
command: mysqld --innodb_file_per_table
As shown above, this file will call on two additional files:
- server.Dockerfile
- signer.Dockerfile
File: server.Dockerfile
FROM golang:1.6.0
MAINTAINER David Lawrence "[email protected]"
RUN apt-get update && apt-get install -y \
libltdl-dev \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
EXPOSE 4443
# Install DB migration tool
RUN go get github.com/mattes/migrate
ENV NOTARYPKG github.com/docker/notary
# Copy the local repo to the expected go path
COPY . /go/src/github.com/docker/notary
WORKDIR /go/src/${NOTARYPKG}
# Install notary-server
RUN go install \
-tags pkcs11 \
-ldflags "-w -X ${NOTARYPKG}/version.GitCommit=`git rev-parse --short HEAD` -X ${NOTARYPKG}/version.NotaryVersion=`cat NOTARY_VERSION`" \
${NOTARYPKG}/cmd/notary-server
ENTRYPOINT [ "notary-server" ]
CMD [ "-config=fixtures/server-config-local.json" ]
File: signer.Dockerfile
FROM golang:1.6.0
MAINTAINER David Lawrence "[email protected]"
RUN apt-get update && apt-get install -y \
libltdl-dev \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
EXPOSE 4444
# Install DB migration tool
RUN go get github.com/mattes/migrate
ENV NOTARYPKG github.com/docker/notary
ENV NOTARY_SIGNER_DEFAULT_ALIAS="timestamp_1"
ENV NOTARY_SIGNER_TIMESTAMP_1="testpassword"
# Copy the local repo to the expected go path
COPY . /go/src/github.com/docker/notary
WORKDIR /go/src/${NOTARYPKG}
# Install notary-signer
RUN go install \
-tags pkcs11 \
-ldflags "-w -X ${NOTARYPKG}/version.GitCommit=`git rev-parse --short HEAD` -X ${NOTARYPKG}/version.NotaryVersion=`cat NOTARY_VERSION`" \
${NOTARYPKG}/cmd/notary-signer
ENTRYPOINT [ "notary-signer" ]
CMD [ "-config=fixtures/signer-config-local.json" ]
Now, I am trying to deploy these containers using the following JSON file:
File: notary-composer.json
{
"id": "dockernotary",
"cmd": " ",
"instances": 1,
"constraints": [["hostname", "CLUSTER", "node264.local.net"]],
"executor":"/opt/docker-compose-executor/bin/docker-compose-executor.sh",
"labels": {
"fileName": "/opt/docker-compose-executor/etc/docker-compose.yml"
}
}
I tried to submit it to /apps
and /groups
. Attempt to submit to /apps
resulted in a deployment going into a Waiting
state.
Any clues ?
Thanks!!
Alex