https://github.com/brobert83/devops-test-vm
https://github.com/brobert83/devops-test-vm
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/brobert83/devops-test-vm
- Owner: brobert83
- Created: 2020-09-28T01:43:59.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-29T00:17:36.000Z (almost 6 years ago)
- Last Synced: 2025-03-21T06:12:47.268Z (over 1 year ago)
- Language: Shell
- Size: 82 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## This repo contains the local environment used to build the CI process for [devops-test](https://github.com/brobert83/devops-test)
# General notes
- It is a Vagrant machine provisioned with Ansible
- It's purpose is to interact with GCP and TravisCI (to test scripts, encrypt files for travis, etc)
- It is somewhat specific to my local environment (it syncs a directory from my host file system: see the Vagrantfile at the end)
## Requirements
- A GCP project needs to be created before bringing the machine up
- A service account needs to be created
- A key needs to be created for the service account
## Usage
- Edit `Vagrantfile` and change the value of the GCP_PROJECT_NAME variable to the name of your project
- Place the service account key in `secrets/gcp_project_key.json`
- .gitignore has an entry to prevent this directory accidentally be committed
- this [guide](https://docs.bmc.com/docs/PATROL4GoogleCloudPlatform/10/creating-a-service-account-key-in-the-google-cloud-platform-project-799095477.html) shows how to create a key
- Change or remove the synced folder
- Then `vagrant up`
- For GKE, run `gcloud container clusters get-credentials ${cluster_name} --zone=${zone}` to tell kubectl against which cluster to run against
### Other notes
- I used this machine to create the GCP environment setup scripts (under the `travis/` directory)
- I also used it to encrypt the project key needed by Travis
- After I started to build on Travis I stopped updating the scripts because all the work was done on the app repo
- Also I delete environments from here (I don't have a solution for env cleanup yet)