Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sudo-kraken/oci-free-terraform-a1-max
OCI Terraform Module: Automated deployment of OCI resources, including an A1 compute instance, additional storage, and network setup, managed via GitHub Actions with Docker and Docker Compose integrations.
https://github.com/sudo-kraken/oci-free-terraform-a1-max
actions docker docker-compose github-actions iac iac-module iac-terraform oci oci-terraform-modules oracle-cloud terraform terraform-module terraform-modules
Last synced: 27 days ago
JSON representation
OCI Terraform Module: Automated deployment of OCI resources, including an A1 compute instance, additional storage, and network setup, managed via GitHub Actions with Docker and Docker Compose integrations.
- Host: GitHub
- URL: https://github.com/sudo-kraken/oci-free-terraform-a1-max
- Owner: sudo-kraken
- License: gpl-3.0
- Created: 2023-11-12T09:13:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-22T14:38:39.000Z (12 months ago)
- Last Synced: 2024-11-02T22:42:11.555Z (2 months ago)
- Topics: actions, docker, docker-compose, github-actions, iac, iac-module, iac-terraform, oci, oci-terraform-modules, oracle-cloud, terraform, terraform-module, terraform-modules
- Language: HCL
- Homepage:
- Size: 49.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Repo Languages and Tools
A pivotal aspect of this module is its sophisticated networking setup, creating a Virtual Cloud Network (VCN) with all necessary components, such as subnets, security lists, and internet gateways, ensuring seamless connectivity and security.
## Prerequisites
- Oracle Cloud Infrastructure account
- OCI API Credentials stored in the form of GitHub Secrets### Secrets Required
| Secret Name | Description |
|-------------|-------------|
| `PAT_TOKEN` | PAT Token the pipeline uses to checkout the repo. |
| `PKEY` | OCI SSH private key. |
| `TENANCY_OCID` | OCID of your OCI tenancy. |
| `USER_OCID` | OCID of the OCI user. |
| `FP` | Fingerprint for the OCI user. |
| `SSH_PUB_KEY` | SSH public key you wish to use for accessing the provisioned instances. |## Automated Deployment with GitHub Actions
This module is designed for seamless integration with GitHub Actions, allowing for automated deployment. The provided GitHub Action workflow, named 'Execute OCI Pipeline', is triggered manually and performs the following tasks:- Checks out the repository to the GitHub Actions runner.
- Sets up Node.js and Terraform CLI environments.
- Configures SSH Private Key and Terraform variables using GitHub Secrets.
- Initialises Terraform and generates an execution plan.
- Applies the Terraform configuration to deploy the resources.
- In case of failure, the workflow is designed to automatically destroy the resources, ensuring a clean state.## GitHub Action Execution
The `main.tf` file located in the root directory of this repository is crucial for the GitHub Action execution. It serves as the entry point for the Terraform operations triggered by the GitHub Action workflow. When the workflow is run, it uses the configuration defined in `main.tf` to deploy the module. This configuration includes updating and installing additional packages, including Docker and Docker Compose, on the instances.### Accessing the Instances
Upon successful completion of the action, the public IP of the A1 instance will be displayed in the output. You can access the instance via SSH using the username `opc` and the SSH key you have provided. The SSH key is crucial for secure and authenticated access to the instances.It's important to ensure that `main.tf` is correctly set up and updated, as it directly influences the infrastructure that the GitHub Action will provision and manage in OCI (Oracle Cloud Infrastructure).