Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gabriel-milan/lps-utils
Utilities and scripts for LPS/UFRJ
https://github.com/gabriel-milan/lps-utils
Last synced: about 1 month ago
JSON representation
Utilities and scripts for LPS/UFRJ
- Host: GitHub
- URL: https://github.com/gabriel-milan/lps-utils
- Owner: gabriel-milan
- License: mit
- Created: 2019-09-25T12:16:42.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-14T11:31:14.000Z (over 3 years ago)
- Last Synced: 2024-05-01T17:40:15.616Z (7 months ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LPS Cluster
## Clearing a machine
In order to set up a cluster, machines have to be clear. To do that, run the script on `clear_machine/`:### Option 1 - without git
* Get root privileges:
```
sudo -i
```
* Just copy and paste the command lines inside the script to your CLI.### Option 2 - with git
* Clone this repository:
```
git clone https://github.com/gabriel-milan/lps-utils
```
* Go to the script directory:
```
cd lps-utils/clear_machine/
```
* Run it:
```
sudo ./clear.sh
```## Setting up a node
In order to set up a new node, you will need to have a just-formatted machine running CentOS (preferably) and root privileges.### The main script
This step should be done on the node machine.The script on `new_node/` will make most of the stuff needed to set up the node, as downloading dependencies and disabling firewall, for example. This should be ran before anything else.
#### Option 1 - without git
* Get root privileges:
```
sudo -i
```
* Just copy and paste the command lines inside the script to your CLI.#### Option 2 - with git
* Clone this repository:
```
git clone https://github.com/gabriel-milan/lps-utils
```
* Go to the script directory:
```
cd lps-utils/new_node/
```
* Run it:
```
sudo ./initial_setup.sh
```### Last steps
This was made to be as simple as it could be, so here we are at the last steps:#### Disabling SELinux
This step should be done on the node machine.To assure the system will work fine with Rancher/Kubernetes, SELinux must be disabled. The steps are shown below:
* Open the `/etc/selinux/config` file and set the `SELINUX` mod to `disabled`, the content of the file will look like this:
```
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
```#### Enable sudo privileges without password
This step should be done on the node machine.* Edit the `sudoers` file:
```
sudo visudo
```
* At the end of the file, add this line:
```
rancher ALL=(ALL) NOPASSWD:ALL
```
#### Copy SSH credentials into the node
This step should be done on the **front-end** machine.* On the **front-end** machine, run
```
ssh-copy-id -i ~/.ssh/id_rsa.pub rancher@
```### Final considerations
After these steps, the node machine is ready for joining the Rancher cluster, you could just run the command Rancher will provide you and wait for it.