Giter Site home page Giter Site logo

right_st's Introduction

right_st

right_st is a tool for managing RightScale ServerTemplate and RightScripts. The tool is able to download, upload, and show ServerTemplate and RightScripts using RightScale's API. This tool can easily be hooked into Travis CI or other build systems to manage these design objects if stored in Github. See below for usage examples.

Travis CI Build Status AppVeyor Build Status

Installation

Since right_st is written in Go it is compiled to a single static binary. Extract and run the executable below:

Configuration

Right ST interfaces with the RightScale API. Credentials for the API can be provided in two ways:

  1. YAML-based configuration file - Run right_st config account <name>, where name is a nickname for the account, to interactively write the configuration file into $HOME/.right_st.yml for the first time. You will be prompted for the following fields:
    • Account ID - Numeric account number, such as 60073
    • API endpoint host - Hostname, typically my.rightscale.com
    • Refresh Token - Your personal OAuth token available from Settings > Account Settings > API Credentials in the RightScale Cloud Management dashboard
  2. Environment variables - These are meant to be used by build systems such as Travis CI. The following vars must be set: RIGHT_ST_LOGIN_ACCOUNT_ID, RIGHT_ST_LOGIN_ACCOUNT_HOST, RIGHT_ST_LOGIN_ACCOUNT_REFRESH_TOKEN. These variables are equivalent to the ones described in the YAML section above.

Managing RightScripts

RightScripts consist of a script body, attachments, and metadata. Metadata is embedded in the script as a comment between the hashbang and script body in the RightScript Metadata Comments format. This allows a single script file to be a fully self-contained respresentation of a RightScript. Metadata comment format is as follows:

Field Format Description
RightScript Name String Name of RightScript. Name must be unique for your account.
Description String Description field for the RightScript. Free form text which can be Markdown
Inputs Hash of String -> Input The hash key is the input name. The hash value is an Input definition (defined below)
Attachments Array of Strings Each string is a filename of an attachment file. Relative or absolute paths supported. Relative paths will be placed in an "attachments/" subdirectory. For example "1/foo" will expect a file foo at "attachments/1/foo"

Input definition format is as follows:

Field Format Description
Category String Category to group Input under
Description String Description field for the Input
Input Type String single or array
Default String Default value. Value must be in Inputs 2.0 format from RightScale API which consists of a type followed by a colon then the value. I.e. "text:Foo", "ignore", "env:ENV_VAR"
Required Boolean true or false. Whether or not the Input is required
Advanced Boolean true or false. Whether or not the Input is advanced (hidden by default)
Possible Values Array of Strings If supplied, a drop down list of values will be supplied in the UI for this input. Each string must be a text type in Inputs 2.0 format.

Example RightScript is as follows. This RightScript has one attachment, which must be located at "attachments/foo" relative to the script.

#! /bin/bash -e

# ---
# RightScript Name: Run Foo Tool
# Description: Runs attached foo executable with input
# Inputs:
#   FOO_PARAM:
#     Category: RightScale
#     Description: A parameter to the foo tool
#     Input Type: single
#     Required: false
#     Advanced: true
#     Default: "text:foo1"
#     Possible Values: ["text:foo1", "text:foo2"]
# Attachments:
# - foo
# ...
#

cp -f $RS_ATTACH_DIR/foo /usr/local/bin/foo
chmod a+x /usr/local/bin/foo
foo $FOO_PARAM

RightScript Usage

The following RightScript related commands are supported:

right_st rightscript show <name|href|id>
  Show a single RightScript and its attachments. 

right_st rightscript upload [<flags>] <path>...
  Upload a RightScript
  Flags:
    -f, --force:  Force upload of RightScript despite lack of Metadata comments
    -x, --prefix <prefix>: Create dev/test version by adding prefix to name of all
                           RightScripts uploaded

right_st rightscript delete <path>...
  Delete dev/test RightScripts with a prefix.
  Flags:
    -x, --prefix <prefix>: Delete rightscripts specified in file with a prefix. This
                           command acts to cleanup scripts created with upload --prefix.

right_st rightscript download <name|href|id> [<path>]
  Download a RightScript to a file. Metadata comments will automatically be 
   inserted into RightScripts that don't have it.

right_st rightscript scaffold [<flags>] <path>...
  Add RightScript YAML metadata comments to a file or files
  Flags:
    -f, --force: Force regeneration of scaffold data.

right_st rightscript validate <path>...
  Validate RightScript YAML metadata comments in a file or files

right_st rightscript commit --message=MESSAGE <name|href|id|path>...
    Commit RightScript

Managing ServerTemplates

ServerTemplates are defined by a YAML format representing the ServerTemplate. The following keys are supported:

Field Format Description
Name String Name of the ServerTemplate. Name must be unique for your account.
Description String Description field for the ServerTemplate.
RightScripts Hash of String -> Array of RightScripts The hash key is the sequence type, one of "Boot", "Operational", or "Decommission". The hash value is a array of RightScripts. Each RightScript can be specified in one of three ways, as a 1. "local" managed 2. "published", or 3. "external" RightScript. A locally managed RightScript is specified as a pathname to a file on disk and the file contents are synchonized to the HEAD revision of a RightScript in your local account. Published RightScripts are links to pre-existing RightScripts shared in the MultiCloud marketplace and consist of a hash specifying a Name/Revision/Publisher to look up. External RightScripts are pre-existing RightScripts consisting of a Name/Revision pair and will not search the MultiCloud marketplace.
Inputs Hash of String -> String The hash key is the input name. The hash value is the default value. Note this inputs array is much simpler than the Input definition in RightScripts - only default values can be overridden in a ServerTemplate.
MultiCloudImages Array of MultiCloudImages An array of MultiCloudImage definitions and/or MultiCloudImage YAML file references. A MultiCloudImage definition is a hash of fields taking a few different formats. See section below for further details.
Alerts Array of Alerts An array of Alert definitions and/or Alert YAML file references, defined below.

A MultiCloudImage definition allows you to specify an MCI in four different ways by supplying different hash keys. The first three combinations specified below allow you to use pre-existing MCIs. The fourth one allows you to fully manage an MCI in your local account:

  1. 'Name' and 'Revision' and 'Publisher': Name/Revision/Publisher of MCI available in the MultiCloud Marketplace. The MCI will be automatically imported into the account if it's not already there. Preferred. "latest" may be specified for the revision to get the latest revision.
  2. 'Name' and 'Revision'.: Name/Revision of MCI in your local account. It will not attempt to be autoimported from the MultiCloud Marketplace. "latest" or "head" may be specified to get the latest committed revision and "head" revision respectively.
  3. 'Href': Href of the MCI in the account being uploaded. This is a fallback in case 1 or 2 doesn't work.
  4. Fully specified. The following keys are supported:
    • 'Name' - String - Name of the MCI
    • 'Tags' - Array of Strings - Representing tags on the MCI. Typically 'rs_agent:type=right_link_lite' will be required.
    • 'Description' - String - Optional description for the MCI
    • 'Settings' - Array of Settings - A setting represents the following API resource: MultiCloudImageSettings. The following keys are used:
      • Cloud - String - Required - Name of cloud
      • Image - String - Required - resource_uid of image
      • Instance Type - String - Required - Name of instance type.
      • User Data - String - Optional - User Data template for this cloud/image combination.

A MultiCloudImage YAML file is referenced as a normal string in the MultiCloudImages array which is the realtaive path to a YAML file containing an individual MultiCloudImage definition.

An Alert definition consists of three fields: a Name, Definition, and Clause (all strings). Clause is a text description of the Alert with this exact format: If <Metric>.<ValueType> <ComparisonOperator> <Threshold> for <Duration> minutes Then <Action> <ActionValue>:

  • Metric is a collectd metric name such as cpu-0/cpu-idle.
  • ValueType is the metric type (value, count, etc - allowable values differ for each metric so look in the dashboard!).
  • ComparisonOperator is >, >=, <, <=, ==, or !=
  • Threshold is a numeric value such as 100 or 0.5 or NaN for all Metrics except for the RS/* ones. For the RS/* ones its a one of the following server states: pending, booting, operational, decommission, shutting-down, terminated
  • Duration is minutes and must be an integer greater than 0.
  • Action is either "escalate" in which case the ActionValue is the name of the escalation. Or Action is "grow" or "shrink" in which case ActionValue is the custom tag value to use as the voting tag.

An Alert YAML file is referenced as a normal string in the Alerts array which is the relative path to a YAML file containing just the Alerts field with the same format as in the ServerTemplate YAML file.

Here is an example ServerTemplate YAML file:

Name: My ServerTemplate
Description: This is an example Description
Inputs:
  FIRST_INPUT: "text:overriding value"
  SECOND_INPUT: "env:RS_UUID"
RightScripts:
  Boot:
# Format 3: Name/Revision/Publisher: This specifies a RightScript from the Marketplace
  - Name: RL10 Linux Setup Hostname
    Revision: 6
    Publisher: RightScale
# Format 3: Name/Revision/Publisher: This specifies a RightScript from the Marketplace, latest revision
  - Name: RL10 Enable Monitoring
    Revision: latest
    Publisher: RightScale
# Format 2: Name/Revision: A RightScript in your local account
  - Name: My Local RightScript
    Revision: 3
# Format 1: Locally managed scripts on disk, synced to RightScripts in your local account
  - path/to/script1.sh
  - path/to/script2.sh
  Operational:
  - path/to/script1.sh
  Decommission:
  - path/to/decom_script1.sh
MultiCloudImages:
# Format 1: Name/Revision/Publisher pair: This specifies a MCI from the Marketplace
- Name: Ubuntu_12.04_x64
  Revision: 18
  Publisher: RightScale
# Format 1 again: Name/Revision/Publisher pair: This specifies a latest MCI from the Marketplace
- Name: Ubuntu_14.04_x64
  Revision: latest
  Publisher: RightScale
# Format 2: Name/Revision pair: This specifies a account-specific MCI, such as one cloned from a Marketplace MCI
- Name: Ubuntu_14.04_x64_cloned
  Revision: 20
# Format 3: Href to an account-specific MCI
- Href: /api/multi_cloud_images/403042003
# Format 4: Fully Managed MCI object specifying all clouds/images:
- Name: MyUbuntu_14.04_x64
  Description: My companies custom MCI
  Tags:
  - rs_agent:type=right_link_lite
  - rs_agent:mime_shellscript=https://rightlink.rightscale.com/rll/10/rightlink.boot.sh
  Settings:
  - Cloud: EC2 us-east-1
    Instance Type: m3.medium
    Image: ami-5e91b936
  - Cloud: EC2 eu-west-1
    Instance Type: m3.medium
    Image: ami-b1841cc6
# MultiCloudImage file reference
- ubuntu-1604-x64.yml
Alerts:
# Alert definition
- Name: CPU Scale Down
  Description: Votes to shrink ServerArray by setting tag rs_vote:my_app_name=shrink
  Clause: If cpu-0/cpu-idle.value > '50' for 3 minutes Then shrink my_app_name
# Alerts file reference
- common-alerts.yml

Here is an example MultiCloudImage YAML file:

Name: Ubuntu 16.04 x64
Tags:
- rs_agent:type=right_link_lite
- rs_agent:mime_shellscript=https://rightlink.rightscale.com/rll/10/rightlink.boot.sh
Settings:
- Cloud: EC2 us-west-2
  Instance Type: m3.medium
  Image: ami-45224425

Here is an example Alerts YAML file:

Alerts:
- Name: Low memory warning
  Description: Runs escalation named "warning" if free memory drops to < 100MB
  Clause: If memory/memory-free.value < 100000000 for 5 minutes Then escalate warning

ServerTemplate Usage

The following ServerTemplate related commands are supported:

right_st st show <name|href|id>
  Show a single ServerTemplate

right_st st upload <path>...
  Upload a ServerTemplate specified by a YAML document
  Flags:
    -x, --prefix <prefix>:  Create dev/test version by adding prefix to name of all
                            RightScripts uploaded

right_st st delete <path>...
  Delete dev/test ServerTemplates and RightScripts with a prefix
  Flags:
    -x, --prefix <prefix>:  Delete with this prefix. This commands acts as a cleanup
                            for ServerTepmlates uploaded with --prefix.

right_st st download <name|href|id> [<path>]
  Download a ServerTemplate and all associated RightScripts/Attachments to disk
  Flags:
    -p, --published: When downloading RightScripts, first check if it's published in
                     the MultiCloud marketplace and insert a link to the published
                     script if so.
    -m, --mci-settings: When specifying MultiCloudImages, use Format 4. This fully specifies
                        all cloud/image/instance type settings combinations to completely
                        manage the MultiCloudImage in the YAML.
    -s, --script-path <script-path>: Download RightScripts and their attachments
                                     to a subdirectory relative to the download location.

right_st st validate <path>...
  Validate a ServerTemplate YAML document

right_st st commit --message=MESSAGE <name|href|id|path>...
    Commit ServerTemplate
    Flags:
    -n, --no-commit-head:  Do not commit HEAD revisions (if any) of the associated MultiCloud 
                           Images, RightScripts and Chef repo sequences.
    -f, --freeze-repos:  Freeze the repositories

Contributors

This tool is maintained by Douglas Thrift (douglaswth), Peter Schroeter (psschroeter), and Lopaka Delp (lopaka).

License

The right_st source code is subject to the MIT license, see the LICENSE file.

right_st's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

stefhen

right_st's Issues

using mci settings short option

when using -m an error is displayed
right_st: error: unknown short flag โ€˜-mโ€™, try --help
--mci-settings . works without issue

right_st validate on simple example errors on published rightscripts

I can't for the life of me figure out what is wrong with my template yml, it works if I make all scripts local.

$ right_st st validate tmp/PC_10_hello-app/PC_10_hello-app.yml tmp/PC_10_hello-app/PC_10_hello-app.yml: yaml: unmarshal errors:
line 10: cannot unmarshal !!map into string
line 13: cannot unmarshal !!map into string
line 16: cannot unmarshal !!map into string
line 19: cannot unmarshal !!map into string
line 22: cannot unmarshal !!map into string
line 27: cannot unmarshal !!map into string
line 33: cannot unmarshal !!map into string
line 36: cannot unmarshal !!map into string
line 40: cannot unmarshal !!map into string
line 43: cannot unmarshal !!map into string

PC_10_hello-app.zip

Full support for MCIs

Describe MCIs in terms of images (tags/clouds/image ids).. MCIs are just reference by name/href for now meaning MCIs are simple "used" instead of "managed"

Delete requests for namespace (-x) templates: template not found keeps trying to delete scripts

Today I double-tapped the delete operation for a template prefixed with 'mark' (-x mark) for a template and it told me that the template did not exist so it would do nothing.

... and then tried to delete right scripts anyways.


ServerTemplate 'mark_RightScale Docker Host RS_OPS RL10 - 2017q1' does not exist, no need to delete

Deleting RightScript 'mark_SYS set hostname RL10_v2' HREF /api/right_scripts/589040003
Failed to delete RightScript rightscripts/SYS_set_hostname_RL10_v2.sh: invalid response 422 Unprocessable Entity: ActionNotAllowed: Cannot delete as the RightScript (HEAD/committed revision) is being used by one or more ServerTemplates.

Deleting RightScript 'mark_SYS Timezone set - 11H1 RL10_v2' HREF /api/right_scripts/589041003
Failed to delete RightScript rightscripts/SYS_Timezone_set-11H1_RL10_v2.sh: invalid response 422 Unprocessable Entity: ActionNotAllowed: Cannot delete as the RightScript (HEAD/committed revision) is being used by one or more ServerTemplates.
....

Error out on matching attachment names

Download currently overwrites any attachments downloaded if they have the same name. Should error out. Could have multiple rightscripts with an attachment named like 'config.yaml' or some other common pattern.

Add an option to st download to specify rightscript download directory

It would be good to have an option to specify a directory location to contain the rightscripts when downloading a ST. Upload already understands rightscript paths in the yml file.

This way if I specify:

right_st st download --rs_path rightscripts "My Server Template"

                     This would download the server template yml file in the current directory and create a
                     rightscripts directory in the current directory.

If I then contain multiple server templates in a single directory, or my git repo, it would look cleaner and be more organized, i.e. all the rightscripts in one subfolder and all the yml files in the top directory.

FYI, I've already added the code. Not sure how you handle submissions.

root@drew-test:/tmp/drew/right_st_working# ./right_st st download --help
usage: right_st st download [] <name|href|id> []

Download a ServerTemplate and all associated RightScripts/Attachments to disk

Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
-d, --debug Debug mode
-c, --config="/root/.right_st.yml"
Set the config file path.
-a, --account=ACCOUNT RightScale account name to use
-v, --version Show application version.
--rs_path=RS_PATH Download location for rightscripts and attachments

                     Note: The rightscript path is always relative to the server template path.

                     Example: right_st st download --rs_path rightscripts "My Server Template"

                     This would download the server template yml file in the current directory and create a
                     rightscripts directory in the current directory.

Args:
<name|href|id> Script Name or HREF or Id
[] Download location

Validation Fails

Unable to validate ServerTemaplate:

$ right_st st upload generic-foundation-image.yaml:
Validating generic-foundation-image.yaml
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x277bb]

goroutine 1 [running]:
panic(0x80e340, 0xc8200100d0)
    /Users/travis/.gimme/versions/go1.6.darwin.amd64/src/runtime/panic.go:464 +0x3e6
main.validateServerTemplate(0x7fff5fbff573, 0x1d, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/travis/gopath/src/github.com/rightscale/right_st/servertemplate.go:586 +0x14eb
main.stUpload(0xc820282710, 0x1, 0x1, 0x0, 0x0)
    /Users/travis/gopath/src/github.com/rightscale/right_st/servertemplate.go:44 +0x1df
main.main()
    /Users/travis/gopath/src/github.com/rightscale/right_st/main.go:131 +0xc07

This is an approximation of generic-foundation-image.yaml:

Name: st-austin-generic-foundation-image
Description: Testing Right ST
Inputs:
  HOST: "blank"
RightScripts:
  Boot:
  - ../right_scripts/foo.sh
  - ../right_scripts/bar.sh
  - ../right_scripts/foo_bar.sh
  Operational:
  Decommission:
MultiCloudImages:
- Name: mci-generic-foundation-image-master
  Revision: 0
- Href: ...

Support "external" RightScripts in ServerTemplate YAML

Currently, the RightScripts specification in right_st's ServerTemplate YAML only supports RightScripts that are uploaded from the same location as the YAML file; however, you may wish to include "external" RightScripts such as from the MultiCloud Marketplace or just an HREF of a RightScript in your account.

Here are some samples of how this could look:

RightScripts:
  Boot:
  - path/to/script.sh
  - Name: Really Cool External Script from MultiCloud Marketplace
    Revision: 42
  - Href: /api/right_scripts/123456789

Attachments: File already exists with a different md5sum

Hi,

How do I resolve this:

Downloading 'RSIT Spot Instance Notifications (RL10)' to 'rightscripts\RSIT_Spot_Instance_Notifications_RL10.sh'
Download 1 attachments:
Done with 1 attachments: 0KB in 0.0s -> 0.000MB/s
ERROR: Failed to download all attachments: File 'sendEmail' already exists with a different md5sum at locations [rightscripts\attachments\sendEmail, rightscripts\attachments\RSIT_Spot_Instance_Notifications_RL10\sendEmail]

Remote File Locations for Right Script Attachments

It would be very useful to be able to pull down Right Script attachments from remote locations prior to uploading server template.
Example:

...
# Attachments:
# - some_script.sh
# - 
#   name: some_binary.jar
#   url: https://some.artifactory.server/some_binary.jar
# ...
...

In this way it would greatly simplify binary handling when it comes to Right ST working with source control.

MCI update fails when only one MCI is specified

If you've specified only a single MCI, and change the YML definition and attempt to (re)upload, it will fail since right_st attempts to delete the (only) MCI before adding new MCIs.

As it turns out, this may be an API limitation, since you can't "update" a ServerTemplateMultiCloudImage, you can only create or delete. I don't believe you'd be allowed to add a different revision of the same MCI before deleting the "old" revision;
http://reference.rightscale.com/api1.5/resources/ResourceServerTemplateMultiCloudImages.html

account lookup fails

When using the account name as it appears in right_st.yml , the lookup fails, when using the lowercase equivalent it succeeds.

right_st config show
displays the config as
olf3:
host: us-3.rightscale.com
id: 12345
refresh_token: abcdefghij

right_st -a OLF3 st upload sometemplate.yml
ERROR: right_st: Error reading config file: /Users/asdf/.right_st.yml: could not find account: OLF3

right_st.yml

OLF3:
  host: us-3.rightscale.com
  id: 12345
  refresh_token: abcdefh

right_st -a olf3 st upload sometemplate.yml . works

expected behavior:
The name as it appears in the right_st.yml should be used when looking up the account.

disable extension guessing if extension exists.

Add file extension guessing for PowerShell RightScript download using either a
shebang or some heuristics.

Can we disable this if the name of the rightscript has a .extension already ?

Thanks

hg installed by mercurial is a missing dependency

On a clean install of go1.6.2, running make depend results in the following error:

[ERROR] Update failed for bitbucket.org/pkg/inflect: hg is not installed

Manually installing mercurial installs hg. make depend should probably install this.

Cannot force regeneration of metadata on RightScript

https://github.com/rightscale/right_st/blob/a4850023a2c74acefb0dd43c46a3611c87fb0efa/scaffold.go#L50

We are working with your consulting services and I just tried to force scaffolding to regenerate the metadata in the following use-case.

User has an RS that they want to clone and test a new version,
User copies the RS, adds their username/initials as a prefix
(if they uploaded now, despite the new filename, it'd obey metadata and not create that new clone)
So we add the force parameter to the tool, and it does not re-generate the metadata.

in your code, it looks like you have the following logic:
if metadata exists
if not force
show them a message
--no else for "if not force"
else generate fresh metadata.

i've written my own code to clear the metadata but based on your readme, i'm wondering if this code just has a bug whereby it's missing the else condition to overwrite metadata for a forced file which already had metadata.

RightScript attachments with same filename not supported

It looks like attachments with the same name whether the script is the same or not will fail with 'already exists'.

My ST has several scripts with the same attachment. Will fail:

ERROR: Failed to download all attachments: File attachments/rs_distro.sh already exists

I think its safe to assume that if the filename is the same then just skip if the checksum is the same, if its not perhaps need to think about uniqueness. At the moment I can't download an ST because of this logical bug.

Error adding MCI on initial ServerTemplate upload

ERROR:   Failed to associate MCI '/api/multi_cloud_images/1234567890' with ServerTemplate '/api/server_templates/1234567890': invalid response 422 Unprocessable Entity: [["multi_cloud_image_href","has already been taken"]]

Cannot upload RightScript with no Inputs

Inputs appear to be required to validate/upload RightScript metadata. I have a script that has no Inputs.

Inputs with none defined:

# ---
# RightScript Name: foo
# Description: bar
# Inputs: 
# Attachments: []
# ...

Shows: Inputs must be specified

# ---
# RightScript Name: foo
# Description: bar
# Attachments: []
# ...

Shows: Inputs must be specified

Trying Inputs: blank or faking an input doesn't appear to work.

Manage common alerts in a seperate file

Ops shares alerts among many of it's STs. We would love to be able to manage alerts in a separate, much like we do with rightscripts! Maybe MCI's as well??? <3

PowerRegisterSuspendResumeNotification failed with errno= 5 in azure function

In AzureRM we are creating a Function App for right_st.
This function is run as a HttpTrigger
and executing this:

using namespace System.Net
# Input bindings are passed in via param block.
param($Request, $TriggerMetadata)
# Write to the Azure Functions log stream.
Write-Host "PowerShell HTTP trigger function processed a request."
 & "D:\home\site\wwwroot\HttpTrigger2\right_st.exe"

We get the following error: PowerRegisterSuspendResumeNotification failure

Here are the console logs from Azure Function App:
2020-03-17T18:39:21 Welcome, you are now connected to log-streaming service. The default timeout is 2 hours. Change the timeout with the App Setting SCM_LOGSTREAM_TIMEOUT (in seconds).
2020-03-17T18:39:29.439 [Information] Executing 'Functions.HttpTrigger2' (Reason='This function was programmatically called via the host APIs.', Id=60f154ce-6a13-4ec8-8b06-87688dbceba0)
2020-03-17T18:39:29.446 [Information] INFORMATION: PowerShell HTTP trigger function processed a request.
2020-03-17T18:39:30.557 [Error] ERROR: fatal error: PowerRegisterSuspendResumeNotification failure
Script stack trace:
at , D:\home\site\wwwroot\HttpTrigger2\run.ps1: line 8
System.Management.Automation.RemoteException: fatal error: PowerRegisterSuspendResumeNotification failure

Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: fatal error: PowerRegisterSuspendResumeNotification failure
Script stack trace:
at , D:\home\site\wwwroot\HttpTrigger2\run.ps1: line 8
System.Management.Automation.RemoteException: fatal error: PowerRegisterSuspendResumeNotification failure

Note: If we run the following it works( This is using a 7za.exe file that is downloaded from the internet and uploaded to the function):

# Input bindings are passed in via param block.
param($Request, $TriggerMetadata)
# Write to the Azure Functions log stream.
Write-Host "PowerShell HTTP trigger function processed a request."
& "D:\home\site\wwwroot\HttpTrigger2\7za.exe"
Resolution:
Cherry picked:  https://go-review.googlesource.com/c/go/+/219657/

option to skip downloading rightscript attachments?

There are a number of times when I'm on a new computer or I've moved to a new branch which doesn't have attachments committed or gitignored.

In these cases, right_st download wants to re-download any missing attachments, taking time & bandwidth ( I was on a datacard the last time, and didn't have time to redownload our ruby installer)

Is there a flag which would let right_st download the script, but not the attachments?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.