/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Administration/Server/Cluster/deployment/ansible.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2017-04-03 02:45:17 UTC
  • Revision ID: csa@suren.me-20170403024517-dwzj0z0k1cmhxm7u
Restructuring, OpenShift, Ansible, Git

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Users and passwords
2
 
===================
3
 
 - We need to generate hash on one of the nodes (using standard passwd command) and, then:
4
 
    * Distribute this password across the cluster:
5
 
        ansible cluster -u root -m user -a 'name=guest password=$6$ti1Img3Z$8mqZD6QCX2TM4cf3lTybTj8pOEMyAAbFRyqkMyPuZC4T4MCTE66otXb4E.raJeCT/78VVZQiV/yaBHdvQQBYz0'
6
 
    * Distribute a special profile configuring the account for cluster
7
 
        ansible cluster -u root -m copy -a "src=guest_profile dest=/home/guest/.profile"
8
 
    This should be a normal profile, just including the cluster profile from clustered home. 
9
 
    Add in the beginning the following line:
10
 
        . /pdv/home/guest/.profile
11
 
 
12
 
 
13
 
Packages
14
 
========
15
 
 - Install 
16
 
    ansible cluster -u root -m zypper -a 'name=openmpi-devel'
17
 
    
18
 
 - Remove
19
 
    ansible cluster -u root -m zypper -a 'name=openmpi state=absent'
20
 
 
21
 
 - Configure repository
22
 
    ansible cluster -u root -m zypper_repository -a 'name=OFED repo=http://download.opensuse.org/repositories/OFED:/Factory/openSUSE_Factory/OFED:Factory.repo'
23
 
 With current version of ansible, the repository key will be not accepted
24
 
 and the packages from repository will not be installed, unless gpg key
25
 
 checking is disabled. This is achieved with:
26
 
     ansible cluster -u root -m  zypper -a 'name=openmpi-devel disable_gpg_check=yes'
27
 
 
28
 
 
29
 
Services
30
 
========
31
 
 - Adding a new service
32
 
    ansible cluster -u root -m service -a 'name=rpcbind enabled=yes state=started'
33
 
 
34
 
Misc
35
 
====
36
 
 - Run arbitrary non-interactive application
37
 
    ansible cluster -u root -m command -a "systemctl restart sshd"
38
 
 
39
 
 - Execute shell command
40
 
    ansible cluster -u root -m shell -a "( cd software; tar xzf *.tgz )"
41
 
 
42
 
 - Copy file to all nodes
43
 
    ansible cluster -u root -m copy -a "src=guest_profile dest=/home/guest/.profile"