Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions registry/coder/templates/oci-linux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
display_name: Oracle Cloud Infrastructure (Linux)
description: Provision OCI compute instances as Coder workspaces
icon: ../../../../.icons/cloud-devops.svg
verified: false
tags: [vm, linux, oci]
---

# Remote Development on Oracle Cloud Infrastructure (Linux)

Provision OCI compute instances as Coder workspaces.

## Prerequisites

### Authentication

This template assumes you have configured the OCI Terraform provider with API key
credentials. The provider supports configuration through environment variables,
`~/.oci/config`, or Terraform variables. See the OCI provider docs for details:

- https://registry.terraform.io/providers/oracle/oci/latest/docs

You will need:

- Tenancy OCID
- User OCID
- Fingerprint
- Private key
- Region

### Required inputs

Provide these values when using the template:

- `tenancy_ocid`
- `compartment_ocid`

## Architecture

This template provisions the following resources:

- VCN, subnet, route table, and internet gateway
- OCI compute instance
- Boot volume size configured per workspace

> Note: This template is designed to be a starting point. Edit the Terraform to
> customize networking, images, or storage policies.

## code-server

`code-server` is installed via the `coder_agent` init script, and exposed in the
Coder UI through the `code-server` module.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#cloud-config
users:
- name: ${linux_user}
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
groups: sudo
shell: /bin/bash
packages:
- git
write_files:
- path: /opt/coder/init
permissions: "0755"
encoding: b64
content: ${init_script}
- path: /etc/systemd/system/coder-agent.service
permissions: "0644"
content: |
[Unit]
Description=Coder Agent
After=network-online.target
Wants=network-online.target

[Service]
User=${linux_user}
ExecStart=/opt/coder/init
Environment=CODER_AGENT_TOKEN=${coder_agent_token}
Restart=always
RestartSec=10
TimeoutStopSec=90
KillMode=process

OOMScoreAdjust=-900
SyslogIdentifier=coder-agent

[Install]
WantedBy=multi-user.target
runcmd:
- systemctl enable coder-agent
- systemctl start coder-agent
Loading