Skip to content

Commit

Permalink
infinispan role updated
Browse files Browse the repository at this point in the history
  • Loading branch information
arssher committed Oct 8, 2014
1 parent 443bc63 commit 780f369
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 42 deletions.
6 changes: 6 additions & 0 deletions infinispan-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

- hosts: docker-containers
roles:
- infinispan-server

Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
- unarchive: src=/root/infinispan-server-6.0.2.Final-bin.zip dest=/root/ copy=no
- shell: rm /root/infinispan-server-6.0.2.Final-bin.zip
- copy: src=~/lad/infinispan-conf/clustered.xml dest=/root/infinispan-server-6.0.2.Final/standalone/configuration/clustered.xml
- command: nohup /root/infinispan-server-6.0.2.Final/bin/clustered.sh >/dev/null &> /dev/null &

44 changes: 2 additions & 42 deletions test.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,13 @@
---

- hosts: ansible-master
tasks:
- template: src=./base_system dest=/tmp/Dockerfile
- name: check ssh
debug: var=ansible_ssh_port

- hosts: docker-host-nodes
sudo: yes
roles:
- build
tasks:
- name: check ssh
debug: var=ansible_ssh_port
- name: install python-apt
apt: name=python-apt state=present
- name: get curl
apt: name=curl state=present
- name: download and install pip
shell: curl https://bootstrap.pypa.io/get-pip.py | sudo python
- name: install docker-py
pip: name=docker-py
- copy: src=/tmp/Dockerfile dest=/tmp/Dockerfile
- name: build base image
docker_image: name="ubuntu/sshjdk" path=/tmp/ tag=14.04 state=present


- name: run container
#this should be changed in non-local mode: net=host only
docker: state=running image=ubuntu/sshjdk:14.04 net=bridge ports=2222 count=2 privileged=yes
- name: Get facts about launched docker containers
docker_facts:
# add created containers to [docker-containers]
# this should be changed in non-local mode: we don't need to add containers to hosts
- name: add containers to [docker-containers]
add_host: hostname={{item.key}} ansible_ssh_host=172.17.42.1 ansible_ssh_port={{item.value.docker_ports[0].PublicPort}} ansible_ssh_user=root groups=docker-containers
when: item.value.docker_state.Running == True
with_dict: docker_containers
- name: get ips
debug: var=item.value.docker_networksettings.IPAddress
when: item.value.docker_state.Running == True
with_dict: docker_containers

# check added hosts entries
# - template: src=docker_containers_tmpl dest=/tmp/docker_containers_result
- run

- hosts: docker-containers
roles:
- infinispan
- infinispan-server
tasks:
- name: check ssh
debug: var=ansible_ssh_port
Expand Down

0 comments on commit 780f369

Please sign in to comment.