We've been hard at work on the next generation of Ops SDK here at CTO.ai, and we're proud to be able to reveal its next-generation features today.
The Ops SDK is an optional toolkit for making Ops with the best available user interfaces. Today, we'll explore what new features will be available in SDK 2.0, and what you'll need to know to use it.
A new foundation
The original Ops SDK (1.x) was written in TypeScript and is only available for the Node.js platform. We've made a major step toward having our SDK available for a variety of languages by moving the core SDK functionality into a binary daemon written in Rust. This daemon will run alongside your Op code inside its Docker container and provide access to many features of the Ops Platform. It also provides
best-in-class terminal UI features, similar to the existing SDK for Node.js.
All of the daemon functionality is accessible through simple HTTP requests and Unix filesystem operations. We have already begun to use it to write SDKs for Python, Go, and Rust, with more on the way--though only Node.js will be ready for the initial 2.0 release.
One codebase, many interfaces
We are working toward general availability of our Slack integration for the Ops Platform, and SDK 2.0 is a big part of this. In fact, if you write an Op using the user interface elements in the SDK, your code will work seamlessly on Slack and on a local terminal. Each of the interaction prompts will automatically translate from a rich terminal experience to an interface through the Slack UI, with no changes
needed to the Op code beyond the conversion to 2.0.
In addition, the interactive prompt interface in SDK 2.0 will integrate directly with command line options provided on the
ops run command line. Each prompt has a name, which will automatically map to the corresponding command line argument, with the SDK automatically prompting for any arguments that may be missing.
Secure secret storage
The Ops Platform will soon be able to connect to a HashiCorp Vault instance for secure storage of secrets, such as AWS credentials or GitHub tokens. SDK 2.0 will provide access to any of these secrets, both on the local terminal interface and via Slack, through the same prompt API that is used for other, non-sensitive input to the Op program. In addition, the secrets UI will allow for secrets to be overridden by local input, both interactively and through command line arguments.
Migrating your Ops
SDK 2.0 will have some breaking incompatibilities with the current Node.js SDK. Most of these are minor. They are mainly functions that have been synchronous becoming async with the daemon communication. For any questions about how SDK 2.0 works with new and existing Ops, please refer to our FAQ. If you have any trouble, you can also reach out to us at [email protected] or on our community Slack workspace.