Skip to content

Instantly share code, notes, and snippets.

@michaelrice
Last active September 5, 2019 14:06
Show Gist options
  • Save michaelrice/cb2bc94ccd180b0a6f74d823d61093fa to your computer and use it in GitHub Desktop.
Save michaelrice/cb2bc94ccd180b0a6f74d823d61093fa to your computer and use it in GitHub Desktop.
Example Workflow
{
"Available": true,
"BootEnv": "local",
"Bundle": "",
"Description": "Stage that represents workflow completion to local disk boot but leaves the runner running.",
"Documentation": "",
"Endpoint": "",
"Errors": [],
"Meta": {
"color": "green",
"icon": "check circle outline",
"title": "Digital Rebar Community Content"
},
"Name": "rackn-api-training-complete",
"OptionalParams": [],
"Params": {},
"Partial": false,
"Profiles": [],
"ReadOnly": false,
"Reboot": false,
"RequiredParams": [],
"RunnerWait": true,
"Tasks": [
"workflow-reset"
],
"Templates": [],
"Validated": true
}
{
"Available": true,
"Bundle": "",
"Description": "RackN API Training Workflow",
"Documentation": "This workflow includes the DRP Runner in Ubuntu provisioning process for DRP.\n\nAfter the install completes, the workflow installs the runner\nin a waiting state so that DRP will automatically detect and start a\nnew workflow if the Machine.Workflow is updated.\n\nNOTE: To enable, upload the Ubuntu-18.04 ISO as per the ubuntu-18.04 BootEnv\n",
"Endpoint": "",
"Errors": [],
"Meta": {
"color": "blue",
"icon": "linux",
"title": "RackN Content"
},
"Name": "rackn-api-training",
"ReadOnly": false,
"Stages": [
"prep-install",
"ubuntu-18.04-install",
"runner-service",
"finish-install",
"rackn-api-training-complete"
],
"Validated": true
}
using System;
using System.Net;
using RestSharp;
using RestSharp.Authenticators;
namespace drpcsharp
{
class Program
{
static void Main(string[] args)
{
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => { return true; };
var client = new RestClient("https://192.168.1.53:8092/api/v3")
{
Authenticator = new HttpBasicAuthenticator("rocketskates", "passthis")
};
var request = new RestRequest("machines");
var response = client.Get(request);
var machines = response.Content;
Console.WriteLine(machines);
}
}
}
Available: true
Bundle: ""
Description: RackN API Training Workflow
Documentation: |
This workflow includes the DRP Runner in Ubuntu provisioning process for DRP.
After the install completes, the workflow installs the runner
in a waiting state so that DRP will automatically detect and start a
new workflow if the Machine.Workflow is updated.
NOTE: To enable, upload the Ubuntu-18.04 ISO as per the ubuntu-18.04 BootEnv
Endpoint: ""
Errors: []
Meta:
color: blue
icon: linux
title: RackN Content
Name: rackn-api-training
ReadOnly: false
Stages:
- prep-install
- ubuntu-18.04-install
- runner-service
- finish-install
- complete
Validated: true
@michaelrice
Copy link
Author

If the boot-env we need is missing the command to install it:

drpcli bootenvs uploadiso ubuntu-18.04-install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment