otf

module
v0.0.49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: MPL-2.0

README

OTF logo

OTF is an open source alternative to Terraform Enterprise. Includes SSO, team management, agents, and no per-resource pricing.

Docs: https://docs.otf.ninja/

Slack

Quickstart Demo

To quickly try out OTF you can sign into the demo server using your github account:

https://demo.otf.ninja

Once you're signed in, create an organization and make a note of its name - you'll be using it below.

Now we'll login to the account in your terminal. You'll need terraform installed.

NOTE: only terraform version 1.2.0 and later is supported.

Setup local credentials:

terraform login demo.otf.ninja

Confirm with yes to proceed and you'll be asked to give consent for terraform to access your account on OTF. After you give consent, you should be notified that you can close the browser and return to the terminal.

In the terminal terraform login should have printed out confirmation of success:

Success! Terraform has obtained and saved an API token.

Write some terraform configuration to a file, setting the organization to your username:

terraform {
  backend "remote" {
    hostname     = "demo.otf.ninja"
    organization = "<your username>"

    workspaces {
      name = "dev"
    }
  }
}

resource "null_resource" "demo" {}

Initialize terraform:

terraform init

NOTE: if you're using Mac or Windows, you may receive an error similar to the following error:

Error: Failed to install provider

Error while installing hashicorp/null v3.2.1: the current package for registry.terraform.io/hashicorp/null 3.2.1 doesn't match any of the checksums previously recorded in the dependency lock file; for more information: https://www.terraform.io/language/provider-checksum-verification

If so, you need to update your lockfile (.terraform.lock.hcl) to include hashes for the platform that the OTF demo is hosted on (linux):

terraform providers lock -platform=linux_amd64

Then re-run terraform init

Now create a plan:

terraform plan

After you've invoked terraform plan, you'll see the plan output along with a link. Click on the link to the run to view the status and logs:

You can optionally run terraform apply to apply the changes:

terraform apply

You've reached the end of this quickstart demo. See the docs for instructions on deploying OTF.

OTF is in no way affiliated with Hashicorp. Terraform and Terraform Enterprise are trademarks of Hashicorp.

Directories

Path Synopsis
cmd
Package cmd provides CLI functionality.
Package cmd provides CLI functionality.
otf
Package internal contains all go code internal to OTF
Package internal contains all go code internal to OTF
agent
Package agent provides a daemon capable of running remote operations on behalf of a user.
Package agent provides a daemon capable of running remote operations on behalf of a user.
api
Package api provides http handlers for the API.
Package api provides http handlers for the API.
api/types
Package types provides structs suitable for marshaling to/from json:api
Package types provides structs suitable for marshaling to/from json:api
auth
Package auth is responsible for authentication
Package auth is responsible for authentication
authenticator
Package authenticator is responsible for handling the authentication of users with third party identity providers.
Package authenticator is responsible for handling the authentication of users with third party identity providers.
cli
Package cli provides the CLI client, i.e.
Package cli provides the CLI client, i.e.
client
Package client provides an abstraction for interacting with otf services either remotely or locally.
Package client provides an abstraction for interacting with otf services either remotely or locally.
cloud
Package cloud provides types for use with cloud providers.
Package cloud provides types for use with cloud providers.
configversion
Package configversion handles terraform configurations.
Package configversion handles terraform configurations.
daemon
Package daemon configures and starts the otfd daemon and its subsystems.
Package daemon configures and starts the otfd daemon and its subsystems.
disco
Package disco implements terraform's "remote service discovery protocol":
Package disco implements terraform's "remote service discovery protocol":
github
Package github provides github related code
Package github provides github related code
gitlab
Package gitlab provides gitlab related code
Package gitlab provides gitlab related code
http
Package http provides an HTTP interface allowing HTTP clients to interact with otf.
Package http provides an HTTP interface allowing HTTP clients to interact with otf.
http/decode
Package decode contains decoders for various HTTP artefacts
Package decode contains decoders for various HTTP artefacts
http/html
Package html contains code relating specifically to the web UI.
Package html contains code relating specifically to the web UI.
http/html/paths
Package paths provides rails-style path helpers for use with the web app.
Package paths provides rails-style path helpers for use with the web app.
inmem
Package inmem implements a layer of services in memory using purely Go constructs.
Package inmem implements a layer of services in memory using purely Go constructs.
integration
Package integration provides inter-service integration tests.
Package integration provides inter-service integration tests.
json
Package json provides helpers for the JSON encoding.
Package json provides helpers for the JSON encoding.
loginserver
Package loginserver implements a "terraform login protocol" server:
Package loginserver implements a "terraform login protocol" server:
logr
Package logr provides a logger that implements the logr interface
Package logr provides a logger that implements the logr interface
logs
Package logs handles log output from a run
Package logs handles log output from a run
module
Package module is reponsible for registry modules
Package module is reponsible for registry modules
notifications
Package notifications sends notifications for run state transitions and workspace events.
Package notifications sends notifications for run state transitions and workspace events.
organization
Package organization is responsible for OTF organizations
Package organization is responsible for OTF organizations
orgcreator
Package orgcreator is responsible for the creation of organizations.
Package orgcreator is responsible for the creation of organizations.
pubsub
Package pubsub provides cluster-wide publishing and subscribing of events
Package pubsub provides cluster-wide publishing and subscribing of events
rbac
Package rbac is concerned with authorization
Package rbac is concerned with authorization
repo
Package repo handles configuration of VCS repositories.
Package repo handles configuration of VCS repositories.
run
Package run is responsible for OTF runs, the primary mechanism for executing terraform
Package run is responsible for OTF runs, the primary mechanism for executing terraform
scheduler
Package scheduler is responsible for the scheduling of runs
Package scheduler is responsible for the scheduling of runs
semver
Package semver wraps golang.org/x/mod/semver, relaxing the requirement for semantic versions to be prefixed with "v".
Package semver wraps golang.org/x/mod/semver, relaxing the requirement for semantic versions to be prefixed with "v".
sql
Package sql implements persistent storage using the postgres database.
Package sql implements persistent storage using the postgres database.
state
Package state manages terraform state.
Package state manages terraform state.
testbrowser
Package testbrowser provisions web browsers for tests
Package testbrowser provisions web browsers for tests
testcompose
Package testcompose provides interaction with a docker compose stack of services for testing purposes.
Package testcompose provides interaction with a docker compose stack of services for testing purposes.
testutils
Package testutils provides test helpers.
Package testutils provides test helpers.
tokens
Package tokens manages token authentication
Package tokens manages token authentication
variable
Package variable manages terraform workspace variables
Package variable manages terraform workspace variables
vcsprovider
Package vcsprovider is responsible for VCS providers
Package vcsprovider is responsible for VCS providers
workspace
Package workspace provides access to terraform workspaces
Package workspace provides access to terraform workspaces

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL