Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
COmg-CO201-dockerInstallation/_episodes/03-deploy.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
105 lines (79 sloc)
5.17 KB
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
--- | |
title: "Deploy COmanage" | |
teaching: 0 | |
exercises: 10 | |
questions: | |
- "Question here" | |
objectives: | |
- "List the objectives" | |
keypoints: | |
- "List the key takeaways for the episode" | |
workshopOverviewName: "COmanage Workshop: Managing Identities & Collaborations" | |
workshopOverviewURL: "https://github.internet2.edu/lpaglione/COmg-trainingOverview/blob/master/README.md" | |
lessonOverviewName: "CO201 - Installing COmanage Using Docker Images" | |
lessonOverviewURL: "../index.md" | |
previousEpisodeName: "2. Setting up variables" | |
previousEpisodeURL: "/_episodes/02-setupVariables.md" | |
nextEpisodeName: "4. First sign in" | |
nextEpisodeURL: "/_episodes/04-signin.md" | |
--- | |
# 3. Deploy COmanage | |
![Interactive system activity](/assets/img/hands-on-keyboard.png) | |
With our services stack (compose) file all set, we are ready to spin up the services! | |
## Deploy the services | |
Deploy the services using the following command. | |
``` console | |
[training@registry1-private ~]$ docker stack deploy --compose-file comanage-registry-stack.yml comanage | |
Creating network comanage_default | |
Creating service comanage_database | |
Creating service comanage_registry | |
Creating service comanage_ldap | |
``` | |
The three services defined in our file have been created. | |
The virtual machine you are using during the workshop is deployed "behind" an Amazon AWS application load balancer (ALB) and it may take about a minute for the ALB to "see" that the COmanage Registry service is healthy and to route traffic to it. In the meantime, let's check on the service: | |
**Review what Docker stacks are available** | |
``` console | |
[training@registry1-private ~]$ docker stack ls | |
NAME SERVICES ORCHESTRATOR | |
comanage 3 Swarm | |
``` | |
**Review what Docker services are running** | |
``` console | |
[training@registry1-private ~]$ docker service ls | |
ID NAME MODE REPLICAS IMAGE PORTS | |
ypl33s0036a1 comanage_database replicated 1/1 mariadb:10.4.8 | |
95316c0h0x5s comanage_ldap replicated 1/1 sphericalcowgroup/comanage-registry-slapd:2 *:389->389/tcp | |
wniftw1nguw1 comanage_registry replicated 1/1 sphericalcowgroup/comanage-registry:hotfix-3.2.x-shibboleth-sp-4 *:80->80/tcp | |
``` | |
**Review the tasks for the COmanage Registry service** | |
``` console | |
[training@registry1-private ~]$ docker service ps comanage_registry | |
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS | |
ibnk0b81b05q comanage_registry.1 sphericalcowgroup/comanage-registry:hotfix-3.2.x-shibboleth-sp-4 registry1-private.comanage.incommon.training Running Running 8 minutes ago | |
``` | |
**Review the logs for the COmanage Registry services** | |
``` console | |
[training@registry1-private ~]$ docker service logs comanage_registry | |
comanage_registry.1.ibnk0b81b05q@registry1-private.comanage.incommon.training | 2019-11-10 22:11:31,903 CRIT Set uid to user 0 | |
comanage_registry.1.ibnk0b81b05q@registry1-private.comanage.incommon.training | 2019-11-10 22:11:31,905 INFO supervisord started with pid 1 | |
comanage_registry.1.ibnk0b81b05q@registry1-private.comanage.incommon.training | 2019-11-10 22:11:32,908 INFO spawned: 'shibd' with pid 8 | |
comanage_registry.1.ibnk0b81b05q@registry1-private.comanage.incommon.training | 2019-11-10 22:11:32,909 INFO spawned: 'apache2' with pid 9 | |
comanage_registry.1.ibnk0b81b05q@registry1-private.comanage.incommon.training | Created directory /srv/comanage-registry/local/Config | |
comanage_registry.1.ibnk0b81b05q@registry1-private.comanage.incommon.training | Created directory /srv/comanage-registry/local/Plugin | |
... | |
``` | |
You may continuously follow the log files for the service by adding the `-f` flag to the previous command: | |
``` console | |
[training@registry1-private ~]$ docker service logs -f comanage_registry | |
comanage_registry.1.ibnk0b81b05q@registry1-private.comanage.incommon.training | [Mon Nov 11 15:06:45.621935 2019] [core:notice] [pid 9] AH00094: Command line: 'apache2 -D FOREGROUND' | |
comanage_registry.1.ibnk0b81b05q@registry1-private.comanage.incommon.training | 10.255.0.2 - "" [11/Nov/2019:15:06:53 +0000] "GET /registry/ HTTP/1.1" 200 4108 "-" "ELB-HealthChecker/2.0" | |
comanage_registry.1.ibnk0b81b05q@registry1-private.comanage.incommon.training | 10.255.0.2 - "" [11/Nov/2019:15:06:55 +0000] "GET /registry/ HTTP/1.1" 200 4108 "-" "ELB-HealthChecker/2.0" | |
... | |
``` | |
> When you are ready to move on, put the blue post-it note on your computer so that we can make sure to not move forward before everyone is ready. | |
--- | |
NEXT SECTION: [4. First sign in](/_episodes/04-signin.md) | |
PREVIOUS SECTION: [2. Setting up variables](/_episodes/02-setupVariables.md) | |
--- | |
LESSON OVERVIEW: [CO201 - Installing COmanage Using Docker Image](../index.md) | |
WORKSHOP OVERVIEW: [COmanage Workshop: Managing Identities & Collaborations](https://github.internet2.edu/lpaglione/COmg-trainingOverview/blob/master/README.md) |