aws gitea no ssh
This commit is contained in:
parent
bcf868a621
commit
b7d560edcd
21
aws/db.yaml
21
aws/db.yaml
@ -1,25 +1,4 @@
|
|||||||
#cloud-config
|
#cloud-config
|
||||||
# Add groups to the system
|
|
||||||
# Adds the ubuntu group with members 'root' and 'sys'
|
|
||||||
# and the empty group hashicorp.
|
|
||||||
groups:
|
|
||||||
- ubuntu: [root,sys]
|
|
||||||
- hashicorp
|
|
||||||
|
|
||||||
# Add users to the system. Users are added after groups are added.
|
|
||||||
users:
|
|
||||||
- default
|
|
||||||
- name: terraform
|
|
||||||
gecos: terraform
|
|
||||||
shell: /bin/bash
|
|
||||||
primary_group: hashicorp
|
|
||||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
|
||||||
groups: users, admin
|
|
||||||
lock_passwd: false
|
|
||||||
ssh_authorized_keys:
|
|
||||||
- ${rss_key}
|
|
||||||
|
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cp ~/.aws/credentials ./credentials
|
cp ~/.aws/credentials ./credentials
|
||||||
ssh-keygen -t rsa -C "your_email@example.com" -f ./tf-cloud-init -q -N ""
|
|
||||||
docker build -t gitea-aws .
|
docker build -t gitea-aws .
|
||||||
docker run -p 80:80 gitea-aws
|
docker run -p 80:80 gitea-aws
|
||||||
rm tf-cloud-init
|
|
||||||
rm tf-cloud-init.pub
|
|
||||||
rm credentials
|
rm credentials
|
||||||
|
@ -182,14 +182,12 @@ data "template_file" "user_data_server" {
|
|||||||
template = file("server.yaml")
|
template = file("server.yaml")
|
||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
rss_key = file("tf-cloud-init.pub"),
|
|
||||||
private_ip = "${aws_instance.db.private_ip}:5432"
|
private_ip = "${aws_instance.db.private_ip}:5432"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data "template_file" "user_data_db" {
|
data "template_file" "user_data_db" {
|
||||||
template = file("db.yaml")
|
template = file("db.yaml")
|
||||||
vars = {
|
vars = {
|
||||||
rss_key = file("tf-cloud-init.pub"),
|
|
||||||
fes_address = aws_efs_mount_target.alpha.dns_name
|
fes_address = aws_efs_mount_target.alpha.dns_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,4 @@
|
|||||||
#cloud-config
|
#cloud-config
|
||||||
# Add groups to the system
|
|
||||||
# Adds the ubuntu group with members 'root' and 'sys'
|
|
||||||
# and the empty group hashicorp.
|
|
||||||
groups:
|
|
||||||
- ubuntu: [root,sys]
|
|
||||||
- hashicorp
|
|
||||||
|
|
||||||
# Add users to the system. Users are added after groups are added.
|
|
||||||
users:
|
|
||||||
- default
|
|
||||||
- name: terraform
|
|
||||||
gecos: terraform
|
|
||||||
shell: /bin/bash
|
|
||||||
primary_group: hashicorp
|
|
||||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
|
||||||
groups: users, admin
|
|
||||||
lock_passwd: false
|
|
||||||
ssh_authorized_keys:
|
|
||||||
- ${rss_key}
|
|
||||||
|
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
|
Loading…
Reference in New Issue
Block a user