Skip to content

Commit

Permalink
Update Sq docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adrw committed Feb 9, 2022
1 parent 42e14d1 commit a8d5907
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
1 change: 1 addition & 0 deletions ansible/plays/provision/mac_square.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
vars:
install_homebrew_apps_password: "{{ become }}"
install_homebrew_fonts: true
install_ssh: false # rely on Square ssh config and keys
dockitems_to_persist:

dockitems_to_remove:
1 change: 1 addition & 0 deletions ansible/plays/provision/mac_terminal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
vars:
install_homebrew_packages: true
install_homebrew_fonts: true
install_ssh: true
4 changes: 3 additions & 1 deletion ansible/roles/ssh/files/config
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ AddressFamily inet
Host * !github.com
CertificateFile ~/.ssh/id_ed25519-cert.pub

Host 192.168.*,*.alxdr.ca,*.adrw.xyz
IdentityFile ~/.ssh/id_rsa

Host *
AddKeysToAgent yes
ChallengeResponseAuthentication yes
# IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_ed25519
HashKnownHosts yes
PasswordAuthentication no
Expand Down
36 changes: 19 additions & 17 deletions docs/square.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
## Square Setup

```
$ ./bootstrap.sh -p mac_square -r -b /opt/homebrew -v -s adrw
$ ./bootstrap.sh -p mac_square -r -v -s adrw
```

## Steps

- Login to VPN
- Follow steps in go/ssh to create new SSH key, and add to Github and Registry
- Follow steps in [go/cashmobileguide](https://cash-mobile-guide.squarecloudservices.com/android/setup/) to do sq-bootstrap, ssh config, java
- Use quick start command from README to run bootstrap with the above options
- Follow steps in go/ssh to create new SSH key, and add to Bitbucket, Github, and Registry
- Rerun bootstrap which now should succeed (especially for the Square specific parts that require Bitbucket access)
- Run `$ babushka cacerts java mysql`
- Manually import square-primary-g2 cert
- `cd ~/.babushka/deps/cacerts`
- `sudo keytool -import -noprompt -storepass changeit -cacerts -alias square-service-authority -file square-primary-g2.pem`
- The presence of the certificate can be verified using the keytool:
`keytool -list -v -storepass changeit -keystore '/Library/Java/JavaVirtualMachines/<JRE/JDK>/Contents/Home/lib/security/cacerts' | grep 'SHA1: 02:8C:D8:2A:FC:79:3D:18:83:80:DF:48:1C:5F:F3:D1:72:A0:69:C1'`
- Install `rvm` [instructions](https://rvm.io/)
```
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles
rvm install 2.6
rvm use --default 2.6
```
- Install `config_files` to get all default Square CLI tools, Ruby Gems, and configuration
- Below steps may not be needed because of sq-boostrap
- Run `$ babushka cacerts java mysql`
- Manually import square-primary-g2 cert
- `cd ~/.babushka/deps/cacerts`
- `sudo keytool -import -noprompt -storepass changeit -cacerts -alias square-service-authority -file square-primary-g2.pem`
- The presence of the certificate can be verified using the keytool:
`keytool -list -v -storepass changeit -keystore '/Library/Java/JavaVirtualMachines/<JRE/JDK>/Contents/Home/lib/security/cacerts' | grep 'SHA1: 02:8C:D8:2A:FC:79:3D:18:83:80:DF:48:1C:5F:F3:D1:72:A0:69:C1'`
- Install `rvm` [instructions](https://rvm.io/)
```
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable --auto-dotfiles
rvm install 2.6
rvm use --default 2.6
```
- (Optional) Install `config_files` to get all default Square CLI tools, Ruby Gems, and configuration
- Manuall download Mac App Store apps (Byword, Affinity, Microsoft Office...)
- polyrepo
- polyrepo init
Expand Down

0 comments on commit a8d5907

Please sign in to comment.