Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pro Swarm sample: Fixing to run in current Swarm #35

Merged

Conversation

marcellodesales
Copy link
Contributor

Problem

  • Current file does not work to deploy in a swarm from newer docker engines
  • Apparently artifactory-pro.yml is suitable for docker-compose.yml?
[ec2-user@ip-xx-xx-48-169 ~]$ docker --version
Docker version 17.05.0-ce-rc3, build 90d35ab
  • Current behavior does not start because it can't mount the volumes defined

$ docker stack deploy -c artifactory-pro.yml  artfctry

[ec2-user@ip-xxx-xxx-48-169 ~]$ docker stack ps artfctry
ID                  NAME                         IMAGE                                                 NODE                           DESIRED STATE       CURRENT STATE              ERROR                              PORTS
nsjdv1oe6u4k        artfctry_postgresql.1        docker.bintray.io/postgres:9.5.2                      ip-xxx-yyy-48-74.vpc.internal    Ready               Rejected 2 seconds ago     "invalid mount config for type…"
rw657kva6fe5        artfctry_artifactory.1       docker.bintray.io/jfrog/artifactory-pro:5.4.4         ip-xxx-yyy-49-98.vpc.internal    Ready               Rejected 1 second ago      "invalid mount config for type…"
tt3g7jd5gweu        artfctry_postgresql.1        docker.bintray.io/postgres:9.5.2                      ip-xxx-yyy-49-13.vpc.internal    Shutdown            Rejected 5 seconds ago     "invalid mount config for type…"
jn1qw6sei5qz        artfctry_artifactory.1       docker.bintray.io/jfrog/artifactory-pro:5.4.4         ip-xxx-yyy-48-74.vpc.internal    Shutdown            Rejected 7 seconds ago     "invalid mount config for type…"
mlkll53otrcm        artfctry_postgresql.1        docker.bintray.io/postgres:9.5.2                      ip-xxx-yyy-49-44.vpc.internal    Shutdown            Rejected 10 seconds ago    "invalid mount config for type…"
f1ht10vb8shx        artfctry_artifactory.1       docker.bintray.io/jfrog/artifactory-pro:5.4.4         ip-xxx-yyy-48-240.vpc.internal   Shutdown            Rejected 10 seconds ago    "invalid mount config for type…"
5y2rad3iyxak        artfctry_postgresql.1        docker.bintray.io/postgres:9.5.2                      ip-xxx-yyy-49-13.vpc.internal    Shutdown            Rejected 15 seconds ago    "invalid mount config for type…"
be4bt0n9b8og        artfctry_artifactory.1       docker.bintray.io/jfrog/artifactory-pro:5.4.4         ip-xxx-yyy-48-74.vpc.internal    Shutdown            Rejected 17 seconds ago    "invalid mount config for type…"
mhwrq43ylj5f         \_ artfctry_artifactory.1   docker.bintray.io/jfrog/artifactory-pro:5.4.4         ip-xxx-yyy-49-92.vpc.internal    Shutdown            Rejected 21 seconds ago    "invalid mount config for type…"
thn750n4gdds        artfctry_nginx.1             docker.bintray.io/jfrog/nginx-artifactory-pro:5.4.4   ip-xxx-yyy-48-94.vpc.internal    Running             Preparing 24 seconds ago
v9784uqsa7bo        artfctry_postgresql.1        docker.bintray.io/postgres:9.5.2                      ip-xxx-yyy-48-169.vpc.internal   Shutdown            Rejected 21 seconds ago    "invalid mount config for type…"
n6pdw0kk5cqk        artfctry_nginx.1             docker.bintray.io/jfrog/nginx-artifactory-pro:5.4.4   ip-xxx-yyy-48-145.vpc.internal   Shutdown            Rejected 23 seconds ago    "invalid mount config for type…"

Solution

  • Replacing the volumes definition to a named one
  • Adding the restart policy with a delay
  • Adding a placement to be NOT the swarm manager nodes (by default docker documentation)
  • Defining the named volume, without the driver

The result with this patch is a runnable installation in a Swarm that can be used to start developing.. What needs to be done:

  • Network Placement
  • Persistent Volumes
  • Logging

Users can define on their own.

$ docker stack deploy -c artifactory-pro.yml  artfctry
Creating service artfctry_postgresql
Creating service artfctry_artifactory
Creating service artfctry_nginx

[ec2-user@ip-xxx-yyy-48-169 ~]$ docker stack ps artfctry
ID                  NAME                     IMAGE                                                 NODE                          DESIRED STATE       CURRENT STATE            ERROR               PORTS
sgduqota3zrc        artfctry_nginx.1         docker.bintray.io/jfrog/nginx-artifactory-pro:5.4.4   ip-xxx-yyy-49-44.vpc.internal   Running             Running 14 seconds ago
ozs46nbql2j7        artfctry_artifactory.1   docker.bintray.io/jfrog/artifactory-pro:5.4.4         ip-xxx-yyy-48-94.vpc.internal   Running             Running 16 seconds ago
wm7meyvhyyi2        artfctry_postgresql.1    docker.bintray.io/postgres:9.5.2                      ip-xxx-yyy-48-74.vpc.internal   Running             Running 18 seconds ago

Could get the app running in EC2 ELB....

for-pr

* Replacing the volumes definition to a named one
* Adding the restart policy with a delay
* Adding a placement to be NOT the swarm manager nodes (by default docker documentation)
* Defining the named volume, without the driver
@eldada
Copy link
Contributor

eldada commented Aug 7, 2017

Hi @marcellodesales - can you sign JFrog's CLA so I can review and merge?

Thx!

@NasAmin
Copy link

NasAmin commented Aug 11, 2017

I am very interested in this change as well - thanks

@NasAmin
Copy link

NasAmin commented Aug 14, 2017

I am a bit confused, how can we map a named volume to the container's host directory?

@marcellodesales
Copy link
Contributor Author

@NasAmin You need to use a Docker Volume plugin and write to an EBS volume...

@marcellodesales
Copy link
Contributor Author

@eldada I can't login to the site... Where can I create an account? It's asking me to Login...

@eldada
Copy link
Contributor

eldada commented Aug 20, 2017

@marcellodesales - go directly to the form

@marcellodesales
Copy link
Contributor Author

marcellodesales commented Aug 20, 2017

@eldada DONE! SIgned the CLA.

@eldada eldada merged commit aff980a into jfrog:master Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants