How to convert this to docker

8 views
Skip to first unread message

uday kiran

unread,
Nov 8, 2019, 5:48:04 PM11/8/19
to Ansible Project
We want to integrate Nexus 3 Opensource Edition into our toolchain. Nexus is an artifactory for npm, Docker Registry, maven, nuget, etc. We want to use docker containers for everything.

Problem: Nexus doesn’t offer a CLI based utility to set configuration parameters. That is sad – but it’s a fact. So, we need to do it the “Nexus” way. Nexus can be scripted via Java/Groovy Scripts. A very kind person offers a ready to use ansible based solution for all configuration settings: https://github.com/savoirfairelinux/ansible-nexus3-oss

Test: Find the file “nexus_install.yml”. You can see that the installation is not Docker based. It will install Nexus via tar file on the native host machine. Your task is to rewrite this file to use a Docker container for the installation. Please do not write your own Docker file. We want to use the “official” image from https://hub.docker.com/r/sonatype/nexus3 . For this moment we don’t need fancy Nexus installation modes. Just modify the Nexus administrator password by using the existing ansible tasks.

Dick Visser

unread,
Nov 9, 2019, 10:47:06 AM11/9/19
to ansible...@googlegroups.com
Sounds like you are asking for someone to do your your homework - I’m not sure that is very effective. 
If you have any questions regarding the GitHub and docker repos, contact their respective authors/maintainers. 

If you have specific questions about ansible, feel free to ask here. 
But make sure to give enough details. 


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/22b8d5f3-80db-40ee-ae31-cbc7b5804dfe%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

uday kiran

unread,
Nov 9, 2019, 11:04:22 AM11/9/19
to Ansible Project
This repo creates the Nexus server on the normal machine.
But I want to change it to docker container.
For that, used the Nexus image directly.

But for doing the configuration, how to apply the same in the docker?

Any references?

Dick Visser

unread,
Nov 9, 2019, 1:02:34 PM11/9/19
to ansible...@googlegroups.com
Someone ("savoirfairelinux") created a repository of ansible code to
install Nexus.
But you want that in Docker. Fine.
But how you do that isn't an ansible problem.
Ansible is just an automation tool.
You will have to come up with the things that you want automated.

Again, please reach out to "savoirfairelinux" or "sonatype" for help.
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ab88748d-828b-499d-bcb0-45345868fc25%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

uday kiran

unread,
Nov 9, 2019, 7:37:34 PM11/9/19
to ansible...@googlegroups.com
No, I will go with docker only.
But , the configuration part I want to use the same ansible part to point to container we will create.

Container I will create from ansible.
Like below 

- name: Create Container
      docker_container:
        name: "sonatype/nexus3"
        image: "{{ image }}"
        ports:
          - "{{ src_port }}:{{ dest_port }}"
        volumes:
          - "{{ src_vol }}:{{ dest_vol }}"
        privileged: "{{ privileged }}"

Reply all
Reply to author
Forward
0 new messages