forked from AthenZ/athenz
-
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.
- Loading branch information
1 parent
ed68f7f
commit 0e64cdb
Showing
5 changed files
with
89 additions
and
1 deletion.
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
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,19 @@ | ||
FROM ubuntu:latest | ||
RUN mkdir -p /opt/athenz | ||
COPY ./aws/start.sh /opt/athenz | ||
COPY ./aws/stop.sh /opt/athenz | ||
|
||
RUN apt-get update && apt-get -y install openjdk-8-jdk curl sudo && curl -sL https://deb.nodesource.com/setup_6.x | bash - && apt-get install -y nodejs && npm install -y -g nodemon | ||
|
||
COPY ./assembly/zms/target/athenz-zms-*-bin.tar.gz /opt/athenz | ||
COPY ./assembly/zts/target/athenz-zts-*-bin.tar.gz /opt/athenz | ||
COPY ./assembly/ui/target/athenz-ui-*-bin.tar.gz /opt/athenz | ||
COPY ./assembly/utils/target/athenz-utils-*-bin.tar.gz /opt/athenz | ||
|
||
RUN cd /opt/athenz/ && tar xvfz athenz-zms*.tar.gz && tar xvfz athenz-zts*.tar.gz && tar xvfz athenz-ui*.tar.gz && tar xvfz athenz-utils*.tar.gz | ||
|
||
EXPOSE 9443 | ||
EXPOSE 4443 | ||
EXPOSE 8443 | ||
|
||
CMD /opt/athenz/start.sh && tail -f /opt/athenz/athenz-ui-*/logs/ui/ui.out |
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,6 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
docker build -t athenz/athenz . | ||
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" | ||
docker push athenz/athenz |
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,56 @@ | ||
# Setup Docker | ||
----------------- | ||
|
||
* [Requirements](#requirements) | ||
* [docker](#docker) | ||
* [Launch instance](#launch-instance) | ||
* [Start/Stop Athenz](#startstop-athenz) | ||
|
||
## Requirements | ||
--------------- | ||
|
||
### docker | ||
----------- | ||
|
||
Please checkout https://docs.docker.com/engine/installation/ for docker installation. | ||
|
||
|
||
## Launch instance | ||
------------------- | ||
|
||
Once you have installed docker, launch Athenz by executing the following docker command: | ||
|
||
```shell | ||
docker run -itd -P athenz/athenz | ||
``` | ||
|
||
Once you have started the docker container, you can access Athenz via ports exposed by docker. | ||
|
||
For accessing Athenz UI, open your browser with url https://localhost:32786 | ||
|
||
Internally, Athenz UI Server will be listening on port 9443. ZMS will be listening on port 4443 and ZTS will be on port 8443. | ||
|
||
default login/password is athenz:athenz | ||
|
||
```shell | ||
amountblood-lm:athenz charlesk$ docker ps | ||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | ||
6cc857e7f97e athenz/athenz "/bin/sh -c '/opt/..." 6 minutes ago Up 2 seconds 0.0.0.0:32788->4443/tcp, 0.0.0.0:32787->8443/tcp, 0.0.0.0:32786->9443/tcp elegant_wozniak | ||
``` | ||
|
||
|
||
## Start/Stop Athenz | ||
----------------------- | ||
|
||
run 'docker ps' to get the CONTAINER ID first. | ||
|
||
```shell | ||
amountblood-lm:athenz charlesk$ docker stop 6cc857e7f97e | ||
``` | ||
|
||
To start Athenz, execute the following commands: | ||
|
||
```shell | ||
amountblood-lm:athenz charlesk$ docker start 6cc857e7f97e | ||
``` | ||
|