forked from mbabineau/docker-zk-exhibitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated exhibitor to 1.5.6 to get a newer AWS client that supports TLSv1.2 * CircleCI build PLAT-997
- Loading branch information
Showing
6 changed files
with
94 additions
and
27 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,31 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
utils: vimond/utils@volatile | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: cimg/aws:2023.04 | ||
environment: | ||
IMAGE_NAME: zk-exhibitor | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
- utils/docker-login | ||
- utils/docker-build: | ||
platforms: "linux/amd64" | ||
image-name: "IMAGE_NAME" | ||
push: true | ||
- utils/prisma-cloud-scan-image: | ||
pull-from-registry: true | ||
prisma-cloud-install-cli: true | ||
image-name: "$IMAGE_NAME" | ||
|
||
workflows: | ||
build: | ||
jobs: | ||
- build: | ||
context: | ||
- vimond-global |
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,2 @@ | ||
/.idea/ | ||
/tmp/ |
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,37 +1,29 @@ | ||
FROM debian:7.8 | ||
FROM debian:9.13 | ||
MAINTAINER Mike Babineau [email protected] | ||
|
||
ENV \ | ||
ZK_RELEASE="http://www.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz" \ | ||
EXHIBITOR_POM="https://raw.githubusercontent.com/Netflix/exhibitor/d911a16d704bbe790d84bbacc655ef050c1f5806/exhibitor-standalone/src/main/resources/buildscripts/standalone/maven/pom.xml" \ | ||
EXHIBITOR_POM="https://raw.githubusercontent.com/soabase/exhibitor/v1.5.6/exhibitor-standalone/src/main/resources/buildscripts/standalone/maven/pom.xml" \ | ||
# Append "+" to ensure the package doesn't get purged | ||
BUILD_DEPS="curl maven openjdk-7-jdk+" \ | ||
BUILD_DEPS="curl maven openjdk-8-jdk+" \ | ||
DEBIAN_FRONTEND="noninteractive" | ||
|
||
# Use one step so we can remove intermediate dependencies and minimize size | ||
RUN \ | ||
# Install dependencies | ||
apt-get update \ | ||
&& apt-get install -y --allow-unauthenticated --no-install-recommends $BUILD_DEPS \ | ||
|
||
# Default DNS cache TTL is -1. DNS records, like, change, man. | ||
&& grep '^networkaddress.cache.ttl=' /etc/java-7-openjdk/security/java.security || echo 'networkaddress.cache.ttl=60' >> /etc/java-7-openjdk/security/java.security \ | ||
|
||
# Install ZK | ||
&& curl -Lo /tmp/zookeeper.tgz $ZK_RELEASE \ | ||
&& mkdir -p /opt/zookeeper/transactions /opt/zookeeper/snapshots \ | ||
&& tar -xzf /tmp/zookeeper.tgz -C /opt/zookeeper --strip=1 \ | ||
&& rm /tmp/zookeeper.tgz \ | ||
|
||
# Install Exhibitor | ||
&& mkdir -p /opt/exhibitor \ | ||
&& curl -Lo /opt/exhibitor/pom.xml $EXHIBITOR_POM \ | ||
&& mvn -f /opt/exhibitor/pom.xml package \ | ||
&& ln -s /opt/exhibitor/target/exhibitor*jar /opt/exhibitor/exhibitor.jar \ | ||
|
||
# Remove build-time dependencies | ||
&& apt-get purge -y --auto-remove $BUILD_DEPS \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN apt-get update \ | ||
&& apt-get install -y --allow-unauthenticated --no-install-recommends procps \ | ||
&& apt-get install -y --allow-unauthenticated --no-install-recommends $BUILD_DEPS \ | ||
# Default DNS cache TTL is -1. DNS records, like, change, man. && \ | ||
&& grep '^networkaddress.cache.ttl=' /etc/java-8-openjdk/security/java.security || echo 'networkaddress.cache.ttl=60' >> /etc/java-8-openjdk/security/java.security \ | ||
# Install Exhibitor \ | ||
&& mkdir -p /opt/exhibitor \ | ||
&& curl -Lo /opt/exhibitor/pom.xml $EXHIBITOR_POM \ | ||
&& mvn -f /opt/exhibitor/pom.xml package \ | ||
&& ln -s /opt/exhibitor/target/exhibitor*jar /opt/exhibitor/exhibitor.jar \ | ||
# Remove build-time dependencies \ | ||
&& apt-get purge -y --auto-remove $BUILD_DEPS \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy in our vended version of zk | ||
ADD zk-dist/zookeeper-3.4.6.tar.gz /opt/ | ||
|
||
# Add the wrapper script that sets up configs without using AWS | ||
ADD include/vimond-wrapper.sh /opt/exhibitor/wrapper.sh | ||
|
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,7 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
|
||
docker build . -t local/zk | ||
docker compose down | ||
docker compose rm --force | ||
docker compose up |
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,35 @@ | ||
version: "3.9" | ||
services: | ||
zk1: | ||
cap_add: | ||
- NET_ADMIN | ||
- NET_RAW | ||
image: local/zk | ||
ports: | ||
- "8181:8181" | ||
environment: | ||
- AWS_ACCESS_KEY_ID | ||
- AWS_SECRET_ACCESS_KEY | ||
- AWS_REGION | ||
- S3_PREFIX=dvltest-zk-test | ||
- S3_BUCKET=dvl-zk-exhibitor-testing | ||
zk2: | ||
environment: | ||
- AWS_ACCESS_KEY_ID | ||
- AWS_SECRET_ACCESS_KEY | ||
- AWS_REGION | ||
- S3_PREFIX=dvltest-zk-test | ||
- S3_BUCKET=dvl-zk-exhibitor-testing | ||
image: local/zk | ||
ports: | ||
- "8182:8181" | ||
zk3: | ||
environment: | ||
- AWS_ACCESS_KEY_ID | ||
- AWS_SECRET_ACCESS_KEY | ||
- AWS_REGION | ||
- S3_PREFIX=dvltest-zk-test | ||
- S3_BUCKET=dvl-zk-exhibitor-testing | ||
image: local/zk | ||
ports: | ||
- "8183:8181" |
Binary file not shown.