name: InstallMockServers description: this document installs the Mock oAuth and TCP servers schemaVersion: 1.0 phases: - name: build steps: - name: InstallServers action: ExecuteBash inputs: commands: - sudo yum -y update - | ######################################## # Global variable declarations # ######################################## ######################################## # The variables below should be modified according to specifications ######################################## # of variables injected via SecureProxyStack TCP_SERVER_PORT="@@TCP_SERVER_PORT@@" OAUTH_SERVER_PORT="@@OAUTH_SERVER_PORT@@" # of variables injected via SecureProxyStack # install docker # see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html sudo amazon-linux-extras install docker sudo service docker start sudo systemctl enable docker.service sudo usermod -a -G docker ec2-user # run the TCP server as a docker daemon docker run -p ${TCP_SERVER_PORT}:9000 --restart=always -d venilnoronha/tcp-echo-server:latest # run the mock auth server as a docker daemon docker run -p ${OAUTH_SERVER_PORT}:8080 --restart=always -d ghcr.io/navikt/mock-oauth2-server:0.3.5