Giter Club home page Giter Club logo

ansible-ex's Introduction

Documentation

This role used for deplaoy docker swarm stack.

Quickstart

Install ansible on the your host Install python on the servers, if necessary
You need to create a requirements.yml file and write down what roles are required in it. Then install roles from this file. Install required rolles:

$ ansible-galaxy install -r requirements.yml

Clone this repository in your directory:

$ git clone https://github.com/unicanova/ansible-docker-swarm
$ cd ansible-docker-swarm

Specify host addresses in the file /etc/ansible/hosts.
Create a site.yml file, where you can specify the which template use for deplaoy docker swarm stack.
In the playbook site.yml you can override varibales according to the table, if necessary.

Execute command:

$ ansible-playbook site.yml -b --extra-vars "ansible_sudo_pass=yourPassword"

Example requirements.yml:

- src: https://github.com/unicanova/ansible-docker-swarm
  version: master
  name: ansible-docker-swarm

Example hosts file:

[jenkinsmaster]
192.168.122.123 ansible_ssh_port=22 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=~/.ssh/id_rsa

[jenkinslave]
192.168.122.77 ansible_ssh_port=22 ansible_ssh_user=ubuntu ansible_ssh_private_key_file=~/.ssh/id_rsa

Example site.yml:

- hosts: test
  roles:
    - ansible-docker-swarm
  vars_from: 
    - registry.yml

Playbook variables

Variable name Variables description
docker_registry_url registry url
docker_registry_username your docker registry user name
docker_registry_password your password for login into registry
docker_registry_username_email your email (not required)
docker_regisry_reauth make reauth or not each time when role will be started
stack_directory
swarm_user
swarm_group
docker_compose_template file name for deploy swarm
stack_name docker stack name

ansible-ex's People

Watchers

James Cloos avatar Dmitri Yevtushenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.