DevPod on Oracle Cloud Infrastructure
Use this referral code to get €20 in credits (at time of writing).
DevPod on Oracle Cloud Infrastructure. This project is built on top of the Hetzner provider.
To use this provider in your DevPod setup, you will need to do the following steps:
- See the DevPod documentation for how to add a provider
- Use the reference
haroondilshad/devpod-provider-oracle-cloudto download the latest release from GitHub - Configure your Oracle Cloud Infrastructure credentials using the OCI CLI or by creating a config file at
~/.oci/config
| Variable | Description | Example |
|---|---|---|
COMPARTMENT_ID |
Oracle Cloud Infrastructure compartment ID | ocid1.compartment.oc1..aaaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
REGION |
Oracle Cloud Infrastructure region | us-ashburn-1 |
AVAILABILITY_DOMAIN |
Oracle Cloud Infrastructure availability domain | AD-1 |
DISK_IMAGE |
Oracle Cloud Infrastructure image name | Oracle-Linux-8.6-2022.05.31-0 |
DISK_SIZE |
Disk size in GB | 50 |
MACHINE_TYPE |
Oracle Cloud Infrastructure shape | VM.Standard.E4.Flex |
MACHINE_FOLDER |
Local home folder | ~/.ssh |
MACHINE_ID |
Unique identifier for the machine | some-machine-id |
OCI_CONFIG_FILE |
Path to OCI config file | ~/.oci/config |
OCI_PROFILE |
Profile to use in OCI config file | DEFAULT |
To test the provider workflow, you can run the CLI commands directly.
| Command | Description | Example |
|---|---|---|
command |
Run a command on the instance | COMMAND="ls -la" go run . command |
create |
Create an instance | go run . create |
delete |
Delete an instance | go run . delete |
init |
Initialise an instance | go run . init |
start |
Start an instance | go run . start |
status |
Retrieve the status of an instance | go run . status |
stop |
Stop an instance | go run . stop |
To test the provider within the DevPod ecosystem:
-
Install the latest version of the Oracle Cloud provider
-
Backup the original binary:
mv ~/.devpod/contexts/default/providers/oracle-cloud/binaries/oracle_provider/devpod-provider-oracle-cloud-linux-amd64 ~/.devpod/contexts/default/providers/oracle-cloud/binaries/oracle_provider/devpod-provider-oracle-cloud-linux-amd64-orig
-
Build the binary:
go build . -
Move the new binary to the DevPod base:
mv ./devpod-provider-oracle-cloud ~/.devpod/contexts/default/providers/oracle-cloud/binaries/oracle_provider/devpod-provider-oracle-cloud-linux-amd64
- Get an Oracle Cloud Infrastructure account
- Configure your OCI credentials using the OCI CLI or by creating a config file at
~/.oci/config