Installation and setup¶
It is recommended to install o‑o via
pipx but installation with pip also works:
Then create a test directory and login. You will need a password-less ssh key, which you can generate, if you don't already have one.
$ mkdir test-o-o
$ cd test-o-o
$ o-o login
Visit https://o-o.tools/activate
Paste token:
SSH key location (~/.ssh/id_ed25519):
A cloud provider, machine type, and Docker image define an environment in which your commands are run. Datastores define where the output files of your commands are stored. To define environments and datastores, select the tab for one of the currently supported cloud providers: Scaleway or Google Cloud.
Start by
generating an API key.
On step 8, after clicking "Generate API key", you will see a "Credentials
Usage" page. On this page, select the drop down "add API keys to your
environment", and select the .env tab. Copy and paste the contents into a
.env file to your current working directory:
SCW_ACCESS_KEY=####################
SCW_SECRET_KEY=########-####-####-####-############
SCW_DEFAULT_ORGANIZATION_ID=########-####-####-####-############
SCW_DEFAULT_PROJECT_ID=########-####-####-####-############
Next, upload your ssh key to the same project as the API key.
Create a new private bucket
that is used to define a datastore. For this example, name it o-o-data and
choose the Paris region (fr-par).
Finally, create an .ooconfig file that defines an environment to run our
commands and a datastore where outputs of these commands are stored:
project: test-project
environments:
- name: my-simple-env
provider: Scaleway
image: docker.io/debian:stable-slim
machinetype: STARDUST1-S
region: fr-par-1
default: true
datastores:
- name: my-datastore
provider: Scaleway
bucket: o-o-data
region: fr-par
default: true
You should now have two files, .env and .ooconfig, in your current
directory.
We will use a service account for authentication with Google Cloud. In a new or existing project,
create a service account.
Add "Compute Admin", "Storage Admin" and "Service Account User" roles to the
accounts permissions. Once created, select "Manage Keys" from the new service
account, then "Add Key" -> "Create new Key" and create a JSON key. Download the
generated key file and set the environment variable
GOOGLE_APPLICATION_CREDENTIALS to point to its location:
Create a new private bucket
in the same project as the service account. This bucket will be used to define
a datastore. For this example, we will name it o-o-data.
Create an .ooconfig file that defines an environment to run our commands and
a datastore where outputs of these commands are stored:
project: test-project
environments:
- name: my-simple-env
provider: gcp
image: docker.io/debian:stable-slim
machinetype: e2-highcpu-2
region: northamerica-northeast1-b
default: true
datastores:
- name: my-datastore
provider: gcp
bucket: o-o-data
default: true
You should now have an .ooconfig file in your current directory, and the
GOOGLE_APPLICATION_CREDENTIALS environment variable set.
It is recommended to configure environments and datastores on the same provider, but not necessary. You are free to configure multiple environments and datastores on all supported providers.