Skip to content

Instantly share code, notes, and snippets.

View lakshmi-kannan's full-sized avatar

Lakshmi Kannan lakshmi-kannan

  • San Francisco, CA
View GitHub Profile
[vagrant@centos67 ~]$ yum list st2chatops
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.kernel.org
* epel: dl.fedoraproject.org
* extras: linux.mirrors.es.net
* updates: centos.den.host-engine.com
Installed Packages
st2chatops.x86_64 1.3.0-1 @StackStorm_staging-stable
[vagrant@centos67 ~]$ cat /etc/yum.repos.d/StackStorm_staging-stable.repo
[vagrant@st2test ~]$ st2 run core.local cmd=date
.
id: 573a5c0955fc8c20eb55206a
status: succeeded
parameters:
cmd: date
result:
failed: false
return_code: 0
stderr: ''

*) I want to split the code to handle the various pieces into individual functions but don’t want to register them on different paths. This seems like 101 but my googling hasn’t helped me find a way to register them to same path and then handle sub paths and route based on the sub path. This is easily done via express in non-serverless world. There are some libraries which allow me to do this https://github.com/modofunjs/modofun but it’s all too primitive for real world use cases (I can provide details). What is the recommended best practice from Google serverless team?

*) I don’t want to be defining these URLs manually. I would like to write openAPI spec for my APIs and realize them in cloud endpoints and then use google cloud functions to just handle the HTTP calls. It doesn’t seem like

Back up existing Scalyr agent ca_certs.crt

cp /usr/share/scalyr-agent-2/certs/ca_certs.crt /usr/share/scalyr-agent-2/certs/ca_certs.crt.bkup

Fetch and replace Scalyr agent ca_certs.crt

openssl s_client -connect agent.scalyr.com:443 -showcerts </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /usr/share/scalyr-agent-2/certs/ca_certs.crt