Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.29 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.29 KB

Using Ansible and Terraform to install Gitea on any Cloud Environment

With the provided scripts in this Repo you will be able to install Gitea on a Google Cloud Compute Engine (VM). To run the scripts for other cloud environments, the provider in the Terraform file must be modified.

Set up automatic authentication of local GCP developments

It is assumed that the Google Cloud SDK is already installed.

  1. Open your cmd.
  2. Switch to the current project with gcloud: gcloud config set project your-project-name
  3. With gcloud allow local developments and generate a token: gcloud auth application-default login
  4. A window pops up. Confirm everything. gcloud now generates a key file in json format with which our applications are automatically authenticates itself against the GCP. So no credentials need to be specified in the code!

Edit and run the scripts

To use the scripts successfully, please adjust the variables.tf and gitea-playbook.yml files accordingly.

The following variables must be adjusted:

  • variables.tf: user, sshpath, zone, region
  • gitea_playbook.yml: remote_user

To start terraform just type the following commands:

terraform init
terraform apply

...and with terraform destroy you can delete your resources.

Enjoy 😊 !

Best Raki 👋