Last active
September 5, 2019 14:06
-
-
Save michaelrice/cb2bc94ccd180b0a6f74d823d61093fa to your computer and use it in GitHub Desktop.
Example Workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the boot-env we need is missing the command to install it:
drpcli bootenvs uploadiso ubuntu-18.04-install