Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pocke/infra2
https://github.com/pocke/infra2
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pocke/infra2
- Owner: pocke
- License: cc0-1.0
- Created: 2020-01-16T02:10:20.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-10T05:16:09.000Z (over 3 years ago)
- Last Synced: 2024-05-01T23:21:02.571Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 54.7 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Infra
## Raspberry Pi 4
First, install Arch Linux ARM with the following document.
https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4Then, execute the following commands.
```bash
# In your local machine$ ssh [email protected]
# In the Raspberry Pi
$ su
# Root user
$ pacman -Syy
$ pacman --noconfirm -S sudo
$ echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
$ gpasswd -a alarm wheel
$ echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config
$ systemctl restart sshd
# Check login from your local machine with the RSA key
$ exit # from root user$ cd
$ mkdir .ssh
$ curl https://github.com/pocke.keys > .ssh/authorized_keys
$ chmod 400 ~/.ssh/authorized_keys
```Update `~/.ssh/config` to access the Raspberry Pi.
Finally, apply Itamae to the Raspberry Pi from your local machine.
```bash
$ bundle install
$ vim nodes/secrets.yml # Copy the secret values from the password manager
$ UPDATE_ALL=1 bundle exec itamae ssh --node-yaml nodes/secrets.yml --host skitty roles/raspberry-pi-4.rb
```