Differences between revisions 7 and 13 (spanning 6 versions)
Revision 7 as of 2018-04-24 03:07:15
Size: 1059
Editor: PieterSmit
Comment:
Revision 13 as of 2018-10-11 00:21:13
Size: 2103
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
 * Links [[SaltCloudAzure]]
Line 17: Line 18:
== Fix salt-stack apt repo to stable version ==
 * edit /etc/apt/sources.list/saltstack.list
   * deb https://repo.saltstack.com/apt/ubuntu/14.04/amd64/2017.7 trusty main
 * Fix {{{ NO_PUBKEY 0E08A149DE57BFBE }}}
   * sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E08A149DE57BFBE

== Run from dev branch ==
 * Use pip {{{
$ sudo pip install salt==2018.3.0rc1
   }}}

 or
   
 * $ git clone git@github.com:saltstack/salt.git
 * git remote add upstream https://github.com/saltstack/salt
 * $ git fetch --tags
 * virtualenv salt
 * source ./salt/bin/activate
 *
 * pip install -e ./salt
Line 27: Line 48:
= SaltStack errors and notes =
== ERROR:201810 - docker ==
 * {{{
----------
          ID: pull down docker_image xxx
    Function: docker_image.present
        Name: xxx.docker.io/xxx.service.xxx:latest
      Result: False
     Comment: Encountered error pulling xxx.docker.io/xxx.service.xxx:latest: Unable to perform images: cannot import name universaldetector

}}}

THE.END

Salt Stack configuration management

  • Links SaltCloudAzure

  • improve output of state.apply to a lot of minions
    • salt --state-output=mixed --summary "*" state.apply backups.deploy

    • sudo salt-call --state-verbose=false state.apply

salt edit /etc/fstab

  • Edit lines in fstab e.g. Match cloudimg-rootfs and set the last 0 to a 1

    •  $ sudo salt "*" cmd.run "sed -i '/cloudimg-rootfs\s/ s/0$/1/ ; /cloudimg-bootfs\s/ s/0$/2/' /etc/fstab ; cat /etc/fstab" 

Cloud deploy salt-cloud

  • With python debug pudb
    • sudo pudb /usr/bin/salt-cloud --log-level info --map=/etc/salt/cloud.maps.d/softlayer-maps-SVRCONFIG-SALTMASTER.conf

Fix salt-stack apt repo to stable version

Run from dev branch

  • Use pip

    $ sudo pip install salt==2018.3.0rc1
    or
  • $ git clone git@github.com:saltstack/salt.git

  • git remote add upstream https://github.com/saltstack/salt

  • $ git fetch --tags
  • virtualenv salt
  • source ./salt/bin/activate
  • pip install -e ./salt

SaltStack errors and notes

ERROR:201810 - docker

  • ----------
              ID: pull down docker_image xxx
        Function: docker_image.present
            Name: xxx.docker.io/xxx.service.xxx:latest
          Result: False
         Comment: Encountered error pulling xxx.docker.io/xxx.service.xxx:latest: Unable to perform images: cannot import name universaldetector

THE.END ...

SaltStack (last edited 2019-06-16 10:28:54 by PieterSmit)