View Source

h3. Simple instruction to run whydah in a pre-built docker configuration


*Steps:*
# Install docker
# Run (sudo docker run -it -p 9000:9999 totto/whydah /usr/bin/supervisord)
# Goto [http://localhost:9000/sso/welcome]
# Congrats - you made it :!!

*Debug*
{code}
sudo docker run -it -p 80:9999 -p 9990:9990 -p 9995:9995 -p 9996:9996 -p 9997:9997 -p 9998:9998 totto/whydah bin/bash
/usr/bin/supervisord &
ls -al /home/*/log/
{code}

-----

*Steps to build custom images*
# (Install docker)
# Copy Dockerfile
# Build container from Dockerfile (ie: sudo docker build -t="example/whydah-demo" .)
# Run (sudo docker run -it -p 9000:9999 example/whydah /usr/bin/supervisord)
# Goto [http://localhost:9000/sso/welcome]
# Congrats - you made it !! Now you can change the configuration to your likings :)



*Dockerfile* (From here: [https://github.com/altran/Whydah/tree/master/config/Docker])
{code}
# This is a the Dockerfile for a Docker demo-installation of all Whydah services
FROM azul/zulu-openjdk-centos:latest
MAINTAINER Totto <totto@totto.org>
RUN yum install -y wget

RUN adduser SSOLoginWebApp
RUN adduser SecurityTokenService
RUN adduser TestWebApp
RUN adduser UserAdminService
RUN adduser UserAdminWebApp
RUN adduser UserIdentityBackend

## Install SSOLoginWebApp
RUN su - SSOLoginWebApp -c "/usr/bin/wget -O update-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-SSOLoginWebApp/master/update-service.sh"
RUN su - SSOLoginWebApp -c "/usr/bin/wget -O start-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-SSOLoginWebApp/master/start-service.sh"
RUN chmod 755 /home/SSOLoginWebApp/*.sh
RUN su - SSOLoginWebApp -c "/usr/bin/wget -O ssologinservice.PROD.properties -q -N https://raw.githubusercontent.com/altran/Whydah-SSOLoginWebApp/master/src/main/resou$
RUN su - SSOLoginWebApp -c "/home/SSOLoginWebApp/update-service.sh"
RUN su - SSOLoginWebApp -c "/home/SSOLoginWebApp/start-service.sh &"


## Install SecurityTokenService
RUN su - SecurityTokenService -c "/usr/bin/wget -O update-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-SecurityTokenService/master/update-service.s$
RUN su - SecurityTokenService -c "/usr/bin/wget -O start-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-SecurityTokenService/master/start-service.sh"
RUN chmod 755 /home/SecurityTokenService/*.sh
RUN su - SecurityTokenService -c "/usr/bin/wget -O securitytokenservice.PROD.properties -q -N https://raw.githubusercontent.com/altran/Whydah-SecurityTokenService/mast$
RUN su - SecurityTokenService -c "/home/SecurityTokenService/update-service.sh"
RUN su - SecurityTokenService -c "/home/SecurityTokenService/start-service.sh &"

## Install TestWebApp
RUN su - TestWebApp -c "/usr/bin/wget -O update-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-TestWebApp/master/update-service.sh"
RUN su - TestWebApp -c "/usr/bin/wget -O start-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-TestWebApp/master/start-service.sh"
RUN chmod 755 /home/TestWebApp/*.sh
RUN su - TestWebApp -c "/usr/bin/wget -O testwebapp.TEST.properties -q -N https://raw.githubusercontent.com/altran/Whydah-TestWebApp/master/testwebapp.TEST.properties"
RUN su - TestWebApp -c "/home/TestWebApp/update-service.sh"
RUN su - TestWebApp -c "/home/TestWebApp/start-service.sh &"

## Install UserAdminService
RUN su - UserAdminService -c "/usr/bin/wget -O update-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-UserAdminService/master/update-service.sh"
RUN su - UserAdminService -c "/usr/bin/wget -O start-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-UserAdminService/master/start-service.sh"
RUN chmod 755 /home/UserAdminService/*.sh
RUN su - UserAdminService -c "/usr/bin/wget -O useradminservice.PROD.properties -q -N https://raw.githubusercontent.com/altran/Whydah-UserAdminService/master/src/main/r$
RUN su - UserAdminService -c "/home/UserAdminService/update-service.sh"
RUN su - UserAdminService -c "/home/UserAdminService/start-service.sh &"

## Install UserAdminWebApp
RUN su - UserAdminWebApp -c "/usr/bin/wget -O update-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-UserAdminWebApp/master/update-service.sh"
RUN su - UserAdminWebApp -c "/usr/bin/wget -O start-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-UserAdminWebApp/master/start-service.sh"
RUN chmod 755 /home/UserAdminWebApp/*.sh
RUN su - UserAdminWebApp -c "/usr/bin/wget -O useradminwebapp.PROD.properties -q -N https://raw.githubusercontent.com/altran/Whydah-UserAdminWebApp/master/src/main/reso$
RUN su - UserAdminWebApp -c "/home/UserAdminWebApp/update-service.sh"
RUN su - UserAdminWebApp -c "/home/UserAdminWebApp/start-service.sh &"

## Install UserIdentityBackend
RUN su - UserIdentityBackend -c "/usr/bin/wget -O update-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-UserIdentityBackend/master/update-service.sh"
RUN su - UserIdentityBackend -c "/usr/bin/wget -O start-service.sh -q -N https://raw.githubusercontent.com/altran/Whydah-UserIdentityBackend/master/start-service.sh"
RUN chmod 755 /home/UserIdentityBackend/*.sh
RUN su - UserIdentityBackend -c "/usr/bin/wget -O useridentitybackend.PROD.properties -q -N https://raw.githubusercontent.com/altran/Whydah-UserIdentityBackend/master/s$
RUN su - UserIdentityBackend -c "/home/UserIdentityBackend/update-service.sh"
RUN su - UserIdentityBackend -c "/home/UserIdentityBackend/start-service.sh &"
{code}

*Build*
{code}
sudo docker build -t="totto/whydah-demo:v0.7" .
{code}

*Access*
* http://172.17.0.116:9999/sso/login