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

Fix/docker friendly #176

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

nka11
Copy link

@nka11 nka11 commented Dec 20, 2019

Fixes for making these roles friendly with ISAM docker deployement

REF: #175

@ram-ibm
Copy link
Collaborator

ram-ibm commented Jan 10, 2020

I see that it is not comprehensive but an incredible first shot at this. Glanced over the changes - need to examine in more detail. For example, I am not clear on the call to /lmi to determine Docker status.

@nka11
Copy link
Author

nka11 commented Jan 14, 2020

Hi Ram,

I gess you're talking about the call in first_steps role.
It's basically the same way you call /lmi with password "admin" to see if first steps have to be processed, as the password in docker is injected by environment var at docker run.

For the handlers, I just read the facts and it's fine. I let you have a closer look and you might feel it as comprehensive as I felt the first_steps role at first analyse :)

@ram-ibm
Copy link
Collaborator

ram-ibm commented Jan 15, 2020

This is good - I just need to get the time to test it before I can merge.

Copy link

@Scoi4101 Scoi4101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the base first_steps be updated as well ?
maybe add the default_password under the defaults folder ?
Otherwise I like the handler changes.

@nka11
Copy link
Author

nka11 commented Jan 22, 2020

@ram-ibm any idea on how to implement the docker snapshot publish (PUT /core/docker/publish) and run it instead of the commit handler ?

@Scoi4101
Copy link

in theory adding a new handler

  • name: Docker Publish
    isam:
    appliance: "{{ inventory_hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    lmi_port: "{{ lmi_port }}"
    log: "{{ log_level }}"
    force: "{{ force }}"
    action: ibmsecurity.isam.docker.publish.publish_changes

with the when condition for the docker model should work

However I am trying this using a custom role with no luck yet

@nka11
Copy link
Author

nka11 commented Jan 23, 2020

@Scoi4101 👍 thanks for the snip, unfortunately it won't be enough, the handler has to be notified from the other roles.

with your help I fixed this issue for the "Commit Changes" handler by including a dedicated tasks file with the conditionals (last commit)

@Scoi4101
Copy link

Scoi4101 commented Jan 25, 2020

Nice !!! Can we add the same thing for the Restart Reverse Proxy and Restart Runtime Handler ?

@ram-ibm
Copy link
Collaborator

ram-ibm commented Feb 7, 2020

https://docs.ansible.com/ansible/2.3/playbooks_intro.html

handlers:
    - name: restart memcached
      service: name=memcached state=restarted
      listen: "restart web services"
    - name: restart apache
      service: name=apache state=restarted
      listen: "restart web services"

tasks:
    - name: restart everything
      command: echo "this task will restart the web services"
      notify: "restart web services"

My idea was to use the listen option and then either run the appliance specific command or write out a message if it is not applicable and it is Docker.

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.

set_federation handler start_config : Reload Liberty Runtime return 404
4 participants