MDR ScaleFT Notes.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. OKTA owns scaleft
  2. ------------
  3. To add a user to a scaleFT group, just add them to the matching group in OKTA, ScaleFT will automagically query OKTA to pull the new user in via a service account.
  4. -------------
  5. Client Setup
  6. Download and install Sft.
  7. https://www.scaleft.com/docs/setup/enrolling-a-client/
  8. Enrole a new client
  9. sft enroll --team mdr
  10. #this will configure your location ssh config file. Add !User as shown below.
  11. sft ssh-config
  12. $HOME/.ssh/config
  13. sft list-servers
  14. use a bastion host with scaleft
  15. sft ssh -bastion dev-bastion dev-salt-master
  16. resolve server (get ID)
  17. sft resolve proxy
  18. ssh into id of the server
  19. ssh d430bf67-c655-4280-b8ab-9b8bd90ec074
  20. ~/.ssh/config FOR MACS
  21. #SFT configuration. Add the !User centos to ssh using the msoc_build key
  22. Match exec "/usr/local/bin/sft resolve -q %h" !User centos
  23. ProxyCommand "/usr/local/bin/sft" proxycommand %h
  24. UserKnownHostsFile "/Users/bradpoulton/Library/Application Support/ScaleFT/proxycommand_known_hosts"
  25. SCP push a file works with scaleFT
  26. scp deleteme.txt dev-bastion:~/deleteme
  27. scp junk_index_new.tar.gz dev-bastion:~/junk_index_new.tar.gz
  28. SCP pull a file
  29. Duane's script
  30. #!/usr/bin/env bash
  31. #
  32. #
  33. # sftp_as2 afs-splunk-sh splunk
  34. REMOTE_HOST=$1
  35. REMOTE_USER=$2
  36. SFTP_SUBSYSTEM="/usr/libexec/openssh/sftp-server"
  37. function usage {
  38. echo "sftp_as afs-splunk-sh splunk"
  39. }
  40. if [[ $# -ne 2 ]]; then
  41. usage
  42. exit 1
  43. fi
  44. sftp -s "sudo -i -u $REMOTE_USER $SFTP_SUBSYSTEM" $REMOTE_HOST
  45. #usage
  46. ./sftp_as2 dev-saf-splunk-indexer-1 brad_poulton
  47. -------------
  48. Agent/Server Setup
  49. Salt pushes out token and agent then starts the agent. The agent connects to ScaleFT and updates the webpage.
  50. Reenroll the agent if they are not showing up in the scaleft.com website.
  51. systemctl restart sftd
  52. Install dir
  53. /etc/sft
  54. enrollment token (gets deleted after server is enrolled successfully)
  55. /etc/sft/enrollment.token
  56. remove the server's auth token to force them to reauth with scaleft.com (use this if you have deleted the server in the webpage)
  57. rm -rf /var/lib/sftd/device.token
  58. Configuration file
  59. cat /etc/sft/sftd.yaml
  60. Salt grain/pillar is used to determine if dev or prod
  61. salt '' state.sls os_modifications.scaleft
  62. Troubleshooting
  63. level=error msg="task init failed" err="Server is deleted" task=refreshServerToken
  64. remove device.token, place the enrollment.token and restart
  65. Temporarily change the name (salt state currently is not working on the name for dev-salt-master)
  66. Change the name and cannical name in sftd.yaml
  67. vim /etc/sft/sftd.yaml
  68. restart the service
  69. systemctl restart sftd
  70. ---------------
  71. Projects
  72. servers belong to projects
  73. people / groups can be granted access to projects, which gives access to the related servers