Overview

What is The Ops Platform?

The mission of The Ops Platform is to help every development team easily create their own unique developer experiences (see: DevEx or DX) by making DevOps automation accessible to everyone.

The Ops Platform is a set of tools which will allow anyone to automate complex or repetitive development tasks in the form of Commands or Workflows which can then easily be distributed to other developers as an "Op" via The Ops CLI.

A Command should be thought of as a unit level operation, such as "Create 1 m5.xlarge EC2 instance", whereas a Workflow can be thought of as a chain of Commands to tackle larger tasks, such as "Create a new production environment" or  "Setup a new kubernetes cluster".

Once you have created a Command or Workflow, you can then turn it into an Op, which can easily be shared to other developers on any team which you are a member of so that they may benefit from automating the task, as well.


How do I get started quickly?

🚀Sign up  ❯ npm install -g @cto.ai/ops && ops account:signup

📩Invite your team  ❯ ops team:create -n my-team && ops team:invite

👉Join our Slack Community to get help or share your ideas.

📧If you have questions - email us anytime!

Also, check out this getting started video...


How is The Ops Platform for Teams?

Every user that joins The Ops Platform automatically has a personal team, which is chosen by their username (@username). While you can add other users to your personal team, you do not have to. You may prefer to use this as a personal workspace where you can privately test out ideas for Commands and Workflows before sharing them on other teams. Any user can create additional teams (as long as they use a unique team name) and invite users to this new team.

This allows team members who join the same workspace to:

  • share published Ops with others in the workspace
  • share configurations and secret credentials (coming soon!)

How do I use The Ops Platform?

The Ops CLI (@cto.ai/ops) is the primary method that you will use for creating, building, publishing and running Ops.

Commands can be written in any language, but we specifically built The Ops SDK (@cto.ai/sdk) in JavaScript to make it easy for everyone. The SDK also helps you create a interactive experience and unlock valuable platform features such as;

  • who is the current user
  • what teams are they are part of
  • what permissions do they have (coming soon!)

Workflows are written in YAML and follow a syntax that is very common to most CI/CD environments, making them very simple to configure. This makes it easy to use existing commands and combine them into multiple steps of a workflow.

Check out our Getting Started guide for more details on how to get started.


How do I create an Op?

Any repository or source code can become an Op if the following 2 files are added:

  1. ops.yml
  2. Dockerfile

These files can be created by the user, or through The Ops CLI by running:

❯ ops init

and selecting one of the templates in the dropdown menu (i.e. Command or Workflow).

ops.yml

The ops.yml file structures how your Op will run and provides information for how other users will be able to interact with it. The run line of the yml is the entrypoint command that is run as the final step of the Dockerfile to trigger your Op. The sample ops.yml file created by "ops init" for the Command template is shown below.    

version: "1"
ops:
  - name: my_first_op
    description: This is my first op build!
    run: node /ops/index.js
    mountCwd: false
    mountHome: false
    bind:
      - /tmp:/tmp
    port:
      - 3000:3000
    help:
      usage: Your first hello-world op
      arguments:
        username: Your username
        email: Your email
      options:
        build: Build flag
        clear: Clears

Dockerfile

The Dockerfile provides the build instructions to include all of the files and software packages necessary to run the Op. The sample Dockerfile created by the "ops init" for the Command template is shown below.

############################
# Build container
############################
FROM node:10-alpine AS dep

WORKDIR /ops

RUN apk add python make
ADD package.json .
RUN npm install

ADD . .

############################
# Final container
############################
FROM node:10-alpine

WORKDIR /ops

COPY --from=dep /ops .

How do I run an Op?

Running a published Op is as simple as running:

$ ops run example

If this is the first time that you are running this Op, it will automatically be synchronized to your system.

Once this happens you will then be able to run the Op offline if it does not require external API calls and you do not delete the images associated with the Op. When running an Op, it may prompt you for input or interact with your local and/or remote systems in order to help you complete the task for which it was built.


Can an Op run anywhere?

Great question. Currently, we're focused on supporting Ops on your local system however we have some exciting things coming up in our roadmap...

In the near future, API Access Tokens, with restrictions, can be requested from the CTO.ai website to pass into the "ops account:signin" to trigger  Ops to run on behalf of a member of that team. This will enable the Ops to be triggered inside of other toolsets, such as a CI/CD pipeline, or allow people to trigger Ops inside of cloud based machines in their infrastructure. This means you will also be able to trigger an Op from system events that may happen outside of CTO.ai.

The possibilities are endless.


More about the tools...

The Ops CLI (@cto.ai/ops)

Use the Ops CLI to:

  • search our community registry
  • search your team's registry
  • search your local cwd
  • scaffold out a new Op
  • build and run your Ops
  • publish and share Ops
  • manage your user account
  • manage your teams

The Ops SDK (@cto.ai/sdk)

The SDK is an optional Node.js package that accelerates the Command development process and enables integration with extended features of The Ops Platform. It includes two modules, ux and sdk:

const { ux, sdk } = require('@cto.ai/sdk')

The ux module is a collection of command-line utilities that help you build your own professional Node.js CLI in no time. It includes the following components:

  • prompts
  • auto complete
  • spinners & progress bars
  • date pickers, colors & links
  • tree & table layouts, and more very soon...

The sdk module is a set of tools that allow you to:

  • manage state and config for your teams and users
  • access the file-system on your user's host machine
  • track events and analytics for your Op users