diff --git a/examples/lxc/README.md b/examples/lxc/README.md new file mode 100644 index 0000000..b980337 --- /dev/null +++ b/examples/lxc/README.md @@ -0,0 +1,25 @@ +Bootstraping lxc containers using solar and roles from os-ansible-deployment + +At first run: + +`python examples/lxc/example-lxc.py deploy` + +It will do several things: + +* Prepare about ~10 containers on solar-dev1 +* Add linux bridge on solar-dev and solar-dev1 with uid br-int53 +* Setup vxlan tunnel for solar-dev and solar-dev1 +* Generate ssh key and inject it into containers + +Later this containers can be used as regular nodes in solar. +Check rabbitmq example at the end of the file. + +To deploy everything use usual solar commands. +``` +solar changes stage -d +solar changes process +solar changes run-once last +watch -n 1 solar changes report last +``` + +Wait until all actions have state `SUCCESS` diff --git a/examples/riak/README.md b/examples/riak/README.md index e639474..25baa71 100644 --- a/examples/riak/README.md +++ b/examples/riak/README.md @@ -2,7 +2,7 @@ Example of 3 node riak cluster. At first run: -`python riak-example.py deploy` +`python examples/riak/riaks.py deploy` It will prepare riak nodes etc. @@ -15,9 +15,10 @@ solar changes run-once last watch -n 1 solar changes report last ``` +Wait until all actions have state `SUCCESS` After that you can add HAProxy on each node: -`python riak-example.py add_haproxies` +`python examples/riak/riaks.py add_haproxies` Then again normal solar stuff @@ -28,6 +29,8 @@ solar changes run-once last watch -n 1 solar changes report last ``` + +Wait until all actions have state `SUCCESS` After that you have basic 3 node riak cluster running. You can also modify riak http port by: diff --git a/resources/rabbitmq_user/actions/remove.yml b/resources/rabbitmq_user/actions/remove.yml index b73859b..cafb598 100644 --- a/resources/rabbitmq_user/actions/remove.yml +++ b/resources/rabbitmq_user/actions/remove.yml @@ -1,6 +1,6 @@ - hosts: [{{ ip }}] sudo: yes tasks: - - new_rabbitmq_user: user={{user_name}} - vhost={{vhost_name}} - state=absent + - rabbitmq_user: user={{user_name}} + vhost={{vhost_name}} + state=absent diff --git a/resources/rabbitmq_user/actions/run.yml b/resources/rabbitmq_user/actions/run.yml index 9964c22..0a9f719 100644 --- a/resources/rabbitmq_user/actions/run.yml +++ b/resources/rabbitmq_user/actions/run.yml @@ -1,11 +1,11 @@ - hosts: [{{ ip }}] sudo: yes tasks: - - new_rabbitmq_user: user={{user_name}} - password={{password}} - vhost={{vhost_name}} - configure_priv=.* - read_priv=.* - write_priv=.* - tags={{tags}} - state=present + - rabbitmq_user: user={{user_name}} + password={{password}} + vhost={{vhost_name}} + configure_priv=.* + read_priv=.* + write_priv=.* + tags={{tags}} + state=present diff --git a/resources/rabbitmq_vhost/actions/remove.yml b/resources/rabbitmq_vhost/actions/remove.yml index 8dcefd7..f5d1a7c 100644 --- a/resources/rabbitmq_vhost/actions/remove.yml +++ b/resources/rabbitmq_vhost/actions/remove.yml @@ -1,5 +1,5 @@ - hosts: [{{ ip }}] sudo: yes tasks: - - new_rabbitmq_vhost: name={{vhost_name}} - state=absent + - rabbitmq_vhost: name={{vhost_name}} + state=absent diff --git a/resources/rabbitmq_vhost/actions/run.yml b/resources/rabbitmq_vhost/actions/run.yml index 52b8bb2..dadf4b7 100644 --- a/resources/rabbitmq_vhost/actions/run.yml +++ b/resources/rabbitmq_vhost/actions/run.yml @@ -1,5 +1,5 @@ - hosts: [{{ ip }}] sudo: yes tasks: - - new_rabbitmq_vhost: name={{vhost_name}} - state=present + - rabbitmq_vhost: name={{vhost_name}} + state=present