소스 검색

salt, macbook

Brad Poulton 3 년 전
부모
커밋
e50db34a5a
2개의 변경된 파일21개의 추가작업 그리고 32개의 파일을 삭제
  1. 8 1
      AFS Macbook Notes.md
  2. 13 31
      Salt Upgrade Notes.md

+ 8 - 1
AFS Macbook Notes.md

@@ -58,7 +58,14 @@ brew install awscli
 https://github.xdr.accenturefederalcyber.com/duane-waddle/saml2aws/releases
 
 - Uninstall the old version via `brew uninstall saml2aws`
-- Extract the tarball from the link above, and place the binary somewhere in your path
+- Extract the tarball from the link above, and place the binary somewhere in your path. Suggested location is: /Users/{username}/saml2aws/. Add the following to your `.zshrc`
+```
+# AWS Saml
+export PATH="$PATH:/Users/{username}/saml2aws/"
+alias govcloud='saml2aws --skip-prompt -a govcloud login'
+alias commercial='saml2aws --skip-prompt -a commercial login'
+alias saml='saml2aws --skip-prompt -a commercial login && saml2aws --skip-prompt -a govcloud login'
+```
 - Run `xattr -d com.apple.quarantine saml2aws` on the binary or you'll get a warning that you can't run it.
 
 If PR https://github.com/Versent/saml2aws/pull/793 gets merged, we can revert to using brew.

+ 13 - 31
Salt Upgrade Notes.md

@@ -20,7 +20,7 @@ salt 'salt*' saltutil.refresh_pillar
 salt 'salt*' pillar.get yumrepos:salt:version
 ```
 
-Update salt master 
+### Update salt master 
 ```
 salt 'salt*' cmd.run 'cat /etc/yum.repos.d/salt.repo'
 salt 'salt*' state.sls os_modifications.repo_update_redhat --output-diff test=true
@@ -33,7 +33,7 @@ sudo salt 'salt*' state.sls salt_master.salt_posix_acl --output-diff
 salt 'salt*' test.version
 ```
 
-Update salt minions using minion_upgrade salt state
+### Update salt minions using minion_upgrade salt state
 ```
 salt '*' saltutil.refresh_pillar
 salt '*' pillar.get yumrepos:salt:version
@@ -50,6 +50,17 @@ salt -C '* not G@os:RedHat' state.sls salt_minion.minion_upgrade --output-diff t
 salt -C '* not G@os:RedHat' test.version
 ```
 
+### Update salt minions without salt state (when the repo is already up-to-date)
+```
+salt sensu* cmd.run 'cat /etc/yum.repos.d/salt.repo'
+salt sensu* state.sls os_modifications.repo_update_redhat --output-diff test=true
+salt sensu* cmd.run 'cat /etc/yum.repos.d/salt.repo'
+salt sensu* cmd.run 'yum clean all ; yum makecache fast'
+salt sensu* cmd.run 'yum check-update | grep salt'
+salt sensu* cmd.run_bg 'systemd-run --scope yum update salt-minion -y && sleep 20 && systemctl daemon-reload && sleep 20 && systemctl start salt-minion'
+salt sensu* test.version
+```
+
 Did you miss any?
 ```
 salt -G saltversion:300X.X test.version
@@ -74,35 +85,6 @@ next time try this: `salt/fileroots/os_modifications/minion_upgrade.sls` ( move
 
 upgrade salt master then minions
 
-Update the pillar in git
-```
-salt salt* cmd.run 'salt-run fileserver.update'
-salt salt* cmd.run 'salt-run git_pillar.update'
-salt salt* saltutil.refresh_pillar
-salt salt* pillar.get yumrepos:salt:version
-```
-
-Update salt master 
-```
-salt salt* cmd.run 'cat /etc/yum.repos.d/salt.repo'
-salt salt* state.sls os_modifications.repo_update --output-diff test=true
-salt salt* cmd.run 'cat /etc/yum.repos.d/salt.repo'
-salt salt* cmd.run 'yum clean all ; yum makecache fast'
-salt salt* cmd.run 'yum check-update | grep salt'
-salt salt* pkg.upgrade name=salt-master
-sudo salt salt* state.sls salt_master.salt_posix_acl --output-diff
-```
-
-Update salt minions
-```
-salt sensu* cmd.run 'cat /etc/yum.repos.d/salt.repo'
-salt sensu* state.sls os_modifications.repo_update_redhat --output-diff test=true
-salt sensu* cmd.run 'cat /etc/yum.repos.d/salt.repo'
-salt sensu* cmd.run 'yum clean all ; yum makecache fast'
-salt sensu* cmd.run 'yum check-update | grep salt'
-salt sensu* cmd.run_bg 'systemd-run --scope yum update salt-minion -y && sleep 20 && systemctl daemon-reload && sleep 20 && systemctl start salt-minion'
-salt sensu* test.version
-```
 
 Did you miss any?
 `salt -G saltversion:3002.6 test.ping`