-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
@aleksandra-tarkowska says there's a(n idempotency?) problem with the git module: a first run of the playbook fails, but later runs pass. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed devspaceci_home
→ devspace_home
Ran into this Ansible 2.3 bug: ansible/ansible#23607 but since all docker containers are started re-running allows the remainder of the playbook to run:
playbook.yml
:
- hosts: all
roles:
- role: openmicroscopy.docker
docker_use_ipv4_nic_mtu: True
- role: openmicroscopy.devspace
requirements.yml
:
---
- src: openmicroscopy.docker
- src: openmicroscopy.versioncontrol-utils
Vagrantfile
:
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yml"
ansible.raw_arguments = ["--diff"]
ansible.galaxy_role_file = "requirements.yml"
end
end
tasks/main.yml
Outdated
become: yes | ||
become_user: "{{ devspace_user }}" | ||
docker_service: | ||
project_src: "{{ devspaceci_home }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is devspaceci_home
different from devspace_home
?
- name: known_hosts | ||
become: yes | ||
become_user: "{{ devspace_user }}" | ||
shell: ssh-keyscan github.com >> {{ devspace_home }}/slave/.ssh/known_hosts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't ssh-keyscan github.com
always give the same output? Can you hard-code it as a file instead so it's idempotent?
become_user: "{{ devspace_user }}" | ||
command: "{{ devspace_home }}/rename.py {{ devspace_omero_branch }}" | ||
args: | ||
chdir: "{{ devspace_home }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't idempotent.
Discussed with @aleksandra-tarkowska: the other issues were already present so shouldn't be a blocker for this PR. I've added an issue #3 |
This PR has been approved I have tested my change on top of this PR, and tested the full training workflow. If there is no objections, I would like to merge this PR (approved) and open another one on top to include the change required for the removal of the snoopy key as discussed for the training. |
Based on @manics comment, no objections to merging this, but:
|
We will minimally need a PR to change the key name and the path before tagging i.e. ref to snoopy key and the path i.e. changes in #5 |
Testing set up
using an example playbook to provision devspace
The playbook needs to be run twice in order to deploy the devspace |
Failure the first time the example playbook is run
|
I think I have found an issue with this PR |
I had to re-introduce a step 8ffd104 |
The failure described above #2 (comment) is due to the version of ansible used |
Closing this PR replaced by #5 |
I've been testing ansible 2.4 with no obvious issues so far, so we could consider upgrading across the OME if you want. |
devspace is now "self-contained" |
saying that I started again with a "fresh" instance, The playbook runs correctly but |
install ansible 2.3
to test use:
docker compose should work on vm without any additional upgrades