Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Using newest Docker and docker-compose version #262

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ services:

env:
global:
- DOCKER_ENGINE_VERSION=1.10.3
- DOCKER_COMPOSE_VERSION=1.9.0
- DOCKER_VERSION=17.12.0-ce
- DOCKER_COMPOSE_VERSION=1.18.0
- INITIAL_ADMIN_USER=admin.user
- INITIAL_ADMIN_PASSWORD_PLAIN=admin123
- COMPOSE_FILES="-f site/docker-compose.yml"
- JEKYLL_SOURCE="/site"

before_install:
- sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list'
- sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
- sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-key update
- sudo apt-get install -qqy --force-yes linux-image-extra-$(uname -r) apparmor
- sudo apt-get install -qqy --force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" docker-engine=${DOCKER_ENGINE_VERSION}\*
- sudo apt-get install docker-ce
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
Expand Down
40 changes: 20 additions & 20 deletions cmd/compose
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ while [[ $1 ]]; do
esac
done

echo '
### ######## ####### ########
## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ##
## ## ## ## ## ## ########
######### ## ## ## ## ##
## ## ## ## ## ## ##
## ## ######## ####### ##
echo '
### ######## ####### ########
## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ##
## ## ## ## ## ## ########
######### ## ## ## ## ##
## ## ## ## ## ## ##
## ## ######## ####### ##
'

echo "* Initialising ADOP"
Expand Down Expand Up @@ -143,7 +143,7 @@ done
TOOL_SLEEP_TIME=30
until [[ $(docker exec jenkins curl -I -s -u "${JENKINS_PLATFORM_USERNAME}":"${PASSWORD_JENKINS}" localhost:8080/jenkins/|head -n 1|cut -d$' ' -f2) == 200 ]]; do pretty_sleep ${TOOL_SLEEP_TIME} Jenkins; done
until [[ $(docker exec gerrit curl -I -s -u "${GERRIT_PLATFORM_USERNAME}":"${PASSWORD_GERRIT}" localhost:8080/gerrit/|head -n 1|cut -d$' ' -f2) == 200 ]]; do pretty_sleep ${TOOL_SLEEP_TIME} Gerrit; done

# Trigger Load_Platform in Jenkins
if [ "${LOAD}" = "NO" ]; then
echo "* Skipping Loading the Platform"
Expand All @@ -158,11 +158,11 @@ done
else
echo "DOCKER_TLS_VERIFY not set to 1, skipping certificate generation"
fi

# Wait for Nginx to come up before proceeding
echo "* Waiting for Nginx to become available"
until [[ $(curl -k -I -s -u ${INITIAL_ADMIN_USER}:${INITIAL_ADMIN_PASSWORD_PLAIN} ${PROTO}://${TARGET_HOST}/|head -n 1|cut -d$' ' -f2) == 200 ]]; do pretty_sleep 5 Nginx; done

# Tell the user something useful
echo
echo '##########################################################'
Expand Down Expand Up @@ -195,23 +195,23 @@ gen_certs() {
CERT_PATH=$1
if [ -z ${CERT_PATH} ]; then
echo "
Usage :
Usage :
gen-certs <docker_client_certificate_path>
<docker_client_certificate_path>:

<docker_client_certificate_path>:
This is the path of the certificate on jenkins slave container
to be able to run docker commands against docker swarm.
Note - absolute path is required.
Example:

Example:
gen-certs /root/.docker
"
exit 1
fi

####
# Windows Git bash terminal identifies
# /CN=client as a path and appends the absolute path
# Windows Git bash terminal identifies
# /CN=client as a path and appends the absolute path
# of parent directory to it
####
HOST_OS=$(uname)
Expand All @@ -223,7 +223,7 @@ gen_certs() {

####
# Fresh start
####
####
TEMP_CERT_PATH="${HOME}/docker_certs"
rm -rf ${TEMP_CERT_PATH}
mkdir -p ${TEMP_CERT_PATH}
Expand Down Expand Up @@ -262,7 +262,7 @@ gen_certs() {

####
# * Remove unnecessary files
# * Copy the certificates to slave
# * Copy the certificates to slave
####
echo "Uploading certificates to Jenkins Slave at: ${CERT_PATH}"
rm -f ${TEMP_CERT_PATH}/extfile.cnf ${TEMP_CERT_PATH}/client.csr
Expand Down
71 changes: 39 additions & 32 deletions compose/elk.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
# set CUSTOM_NETWORK_NAME to the name of the custom Docker network
version: "3"

elasticsearch:
container_name: elasticsearch
restart: always
image: elasticsearch:2.1.1
net: ${CUSTOM_NETWORK_NAME}
command: elasticsearch -Des.network.host=0.0.0.0
ports:
- "9200:9200"
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
services:
elasticsearch:
container_name: elasticsearch
restart: always
image: elasticsearch:2.1.1
command: elasticsearch -Des.network.host=0.0.0.0
ports:
- "9200:9200"
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data

logstash:
container_name: logstash
restart: always
image: accenture/adop-logstash:0.1.0
net: ${CUSTOM_NETWORK_NAME}
environment:
- "constraint:tier==public"
- LS_HEAP_SIZE=1024m
ports:
- "12201:12201/udp"
- "25826:25826/udp"
- "5000:5000/tcp"
logstash:
container_name: logstash
restart: always
image: accenture/adop-logstash:0.1.0
environment:
- "constraint:tier==public"
- LS_HEAP_SIZE=1024m
ports:
- "12201:12201/udp"
- "25826:25826/udp"
- "5000:5000/tcp"

kibana:
container_name: kibana
restart: always
image: kibana:4.3.1
net: ${CUSTOM_NETWORK_NAME}
command: kibana
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
ports:
- "5601:5601"
kibana:
container_name: kibana
restart: always
image: kibana:4.3.1
command: kibana
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
ports:
- "5601:5601"

volumes:
elasticsearch_data:

networks:
default:
external:
name: ${CUSTOM_NETWORK_NAME}
Loading