Skip to content

Commit

Permalink
Merge pull request #167 from yahoo/aws
Browse files Browse the repository at this point in the history
AWS/Docker Image/Doc updates
  • Loading branch information
havetisyan authored Jul 3, 2017
2 parents f222859 + c4ce056 commit d759693
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 18 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ before_install:
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
script: mvn install -DargLine="-Dlogback.configurationFile=src/test/resources/travis_logback.xml"
after_success:
- test "${TRAVIS_PULL_REQUEST}" == "false" && test "${TRAVIS_TAG}" != "" && ./travis/publish_to_bintray.sh
&& ./docker/publish_docker.sh && ./aws/create_aws_ami.sh
- test "${TRAVIS_PULL_REQUEST}" == "false" && test "${TRAVIS_TAG}" != "" && ./travis/publish_to_bintray.sh && ./aws/create_aws_ami.sh && ./docker/publish_docker.sh
env:
global:
- secure: fqS3OabyL+omMi6eCwajizY6uVq9sXVFmpECPtAfMNsTDh3mh4I2zo6puSZszMWp1+Oc9I1ZO1TvJjrrbEuhfuONT7SMd8U2L8jmtXXLwv1AKn/3IpmAF9PvU723hO9oO5SZDU79dRrlaEDRnoJHeJh1PG2j2vtCEGNZCZ2btNGP5g00yHcMjMUU5kSI113iuRMQLyZuT7WaoCJO8GXXJfTx37seiW4c77Kj+1J/icVhcx4eF/ZOQRXgGAkZo7sPcmuKmBb95eUjgx3guiK2M1pU+oaivaOp1Qm4mkVE9W9p7zYThmrTvIElFHXbGEI9ATDYC+lhi764hj9IIicKF4c6Nghtl6rlrazbJvxYPbyMbURjnVEmzUFn0hhq8vwwBsoqbxJ07Vn0IAoYaAWq0pP9wWUuTYq0yD/BsiFbek4ewwki2QXjr5ZpMFiRymnyn4dqcKXApHL6wDSMmJZ/9ZSadHkOF4b4T3exNd4h6JA6OioErstlPimPjsi7rtR2IkedOYwcYmUKsJ2Wn5fOfNxI6Rg9HfGrtlM1wiIIMbxTxJduwPluuqsPQsu2gHPEXrjqyyE+A9fP1fQPF41vZXnSY+7iCzPn/bZsjSUohHS9GJQvfQ2Np6r2zAbhBo9zFaP7PVBh6IGpAMWYIFg7CQportIjv46pn6cP2e1MMhc=
Expand Down
4 changes: 4 additions & 0 deletions assembly/ui/ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
<exclude>node_modules/</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${basedir}/../../libs/nodejs/auth_core/node_modules</directory>
<outputDirectory>node_modules</outputDirectory>
</fileSet>
<fileSet>
<directory>${basedir}/../../ui/src</directory>
<outputDirectory>src</outputDirectory>
Expand Down
2 changes: 1 addition & 1 deletion aws/create_aws_ami.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cd $CUR_DIR

#run packer
export BASE_AMI_ID=ami-a58d0dc5
sudo ${PACKER_DIR}/packer build -machine-readable ./aws/athenz_ami.json && touch .ami
sudo -E ${PACKER_DIR}/packer build -machine-readable ./aws/athenz_ami.json && touch .ami

echo "-----------------------------------------------"
echo "Athenz AWS AMI Completed"
Expand Down
4 changes: 2 additions & 2 deletions aws/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ if [ ! -f "./var/zms_server/keys/zms_private.pem" ]; then
bin/setup_dev_zms.sh
fi

hostname=`hostname`
hostname=`hostname -f`
public_hostname=`curl http://169.254.169.254/latest/meta-data/public-hostname`

sudo -E bin/zms start
set +e
for i in {1..10};
for i in `seq 1 20`;
do
status=$(curl -k -s -w %{http_code} --output /dev/null https://$hostname:4443/zms/v1/schema)
if [ $status -eq "200" ]; then
Expand Down
6 changes: 3 additions & 3 deletions docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ if [ ! -f "./var/zms_server/keys/zms_private.pem" ]; then
bin/setup_dev_zms.sh
fi

hostname=`hostname`
public_hostname=`hostname`
hostname=`hostname -f`
public_hostname=`hostname -f`

sudo -E bin/zms start
set +e
for i in {1..10};
for i in `seq 1 20`;
do
status=$(curl -k -s -w %{http_code} --output /dev/null https://$hostname:4443/zms/v1/schema)
if [ $status -eq "200" ]; then
Expand Down
2 changes: 1 addition & 1 deletion docker/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sudo -E bin/zms stop

echo "---stopping ui---"
cd /opt/athenz/athenz-ui*
public_hostname=`hostname`
public_hostname=`hostname -f`
export ZMS_SERVER=$public_hostname
export UI_SERVER=$public_hostname
bin/athenz_ui stop
Expand Down
32 changes: 25 additions & 7 deletions docs/setup_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* [AWS Account](#aws-account)
* [Launch EC2 instance](#launch-ec2-instance)
* [Start/Stop Athenz](#startstop-athenz)
* [Access Athenz UI](#access-athenz-ui)

## Requirements
---------------
Expand Down Expand Up @@ -98,19 +99,36 @@ They're running on the following ports:
| ZTS | 8443 |
| UI | 9443 |

To access Athenz UI, open your browser with url https://{ec2-instance-public-dns-name}:9443/athenz
To stop Athenz, execute the following commands:

```shell
$ cd /opt/athenz
$ sudo ./stop.sh
```

## Access Athenz UI
-------------------

To access Athenz UI, open your browser with url

```
https://<ec2-instance-public-dns-name>:9443/athenz
```

Since the services are running with self-signed certificates, configure your browser to
ignore the warnings regarding the UI server certificate.

The administrator must first access the ZMS Server endpoint in the browser to
accept the exception since the Athenz UI contacts ZMS Server to get an authorized
token for the user when logging in. The administrator must access:

```
https://<ec2-instance-public-dns-name>:4443/zms/v1/schema
```

The instance is configured with the following default user details:

| User | Password |
|--------|----------|
| athenz | athenz |

To stop Athenz, execute the following commands:

```shell
$ cd /opt/athenz
$ sudo ./stop.sh
```
4 changes: 2 additions & 2 deletions docs/setup_ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ servers into his/her own web browser.

The administrator must first access the ZMS Server endpoint in the browser to
accept the exception since the Athenz UI contacts ZMS Server to get an authorized
token for the user when logging in. The administrator must access
token for the user when logging in. The administrator must access:

```
https://<zms-server-host-name>:4443
https://<zms-server-host-name>:4443/zms/v1/schema
```

first and accept the certificate exception before accessing Athenz UI.
Expand Down

0 comments on commit d759693

Please sign in to comment.