Compare commits
4 Commits
0b574e24bb
...
4f3de27656
Author | SHA1 | Date | |
---|---|---|---|
4f3de27656 | |||
7b00e6d893 | |||
63b959c8cd | |||
04a7ff551c |
17
README.md
17
README.md
@ -1,17 +0,0 @@
|
||||
# infra-as-code
|
||||
## Setup
|
||||
In order to create customers a one-time setup has to be done. Execute the following command to get started:
|
||||
```sh
|
||||
./install_deps.sh
|
||||
```
|
||||
You can now start creating customers!
|
||||
|
||||
## Create customer
|
||||
```sh
|
||||
./self_service.sh
|
||||
```
|
||||
|
||||
## Remove a customer
|
||||
```sh
|
||||
./rm_customer.sh $CUSTOMER_NAME
|
||||
```
|
@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
sudo apt update --yes && sudo apt upgrade --yes
|
||||
sudo apt install software-properties-common
|
||||
sudo add-apt-repository --yes --update ppa:ansible/ansible
|
||||
sudo apt install --yes virtualbox vagrant ansible
|
||||
ansible-galaxy install -r ./requirements.yml
|
||||
|
@ -28,6 +28,8 @@
|
||||
var_dump(pg_fetch_all($result));
|
||||
?>
|
||||
</p>
|
||||
{% else %}
|
||||
<p>No postgres instance detected.</p>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -135,6 +135,8 @@ def create_env(args: argparse.Namespace):
|
||||
# Generate .ssh
|
||||
ssh_dir = path.join(env_path, ".ssh")
|
||||
Path(ssh_dir).mkdir(exist_ok=True)
|
||||
rsa_path = path.join(ssh_dir, "id_rsa")
|
||||
if not Path(rsa_path).exists():
|
||||
ssh_key_cmd = [
|
||||
"ssh-keygen",
|
||||
"-t",
|
||||
@ -142,7 +144,7 @@ def create_env(args: argparse.Namespace):
|
||||
"-b",
|
||||
"2048",
|
||||
"-f",
|
||||
path.join(ssh_dir, "id_rsa"),
|
||||
rsa_path,
|
||||
]
|
||||
sub.call(ssh_key_cmd)
|
||||
|
||||
|
Reference in New Issue
Block a user