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

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

*) 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

[vagrant@st2test ~]$ st2 run core.local cmd=date
.
id: 573a5c0955fc8c20eb55206a
status: succeeded
parameters:
cmd: date
result:
failed: false
return_code: 0
stderr: ''
[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
~/Documents ❯❯❯ traceroute stackstorm.slack.com ⏎
traceroute: Warning: stackstorm.slack.com has multiple addresses; using 52.5.113.141
traceroute to stackstorm.slack.com (52.5.113.141), 64 hops max, 52 byte packets
1 rt-n56u (192.168.200.1) 1.297 ms 0.860 ms 1.270 ms
2 24.130.8.1 (24.130.8.1) 13.910 ms 13.385 ms 14.055 ms
3 te-0-3-0-2-sur04.santaclara.ca.sfba.comcast.net (68.86.249.169) 17.148 ms 15.017 ms 13.761 ms
4 hu-0-3-0-7-ar01.hayward.ca.sfba.comcast.net (68.87.192.253) 15.344 ms
hu-0-3-0-6-ar01.hayward.ca.sfba.comcast.net (68.87.192.249) 15.396 ms 15.670 ms
5 he-0-19-0-0-ar01.santaclara.ca.sfba.comcast.net (68.85.154.253) 23.606 ms 16.103 ms
hu-0-0-0-1-ar01.santaclara.ca.sfba.comcast.net (68.85.57.145) 15.556 ms
Installation failures and next steps
====================================
We have seen installer failing for the following reasons:
1) Problem: Installer is running behind a proxy.
Solution: While we make the installer resilient to handle proxies (probably next release), please use AWS to try out StackStorm.
Here are the image ids available in the us-east-1:
Process: Spark [491]
Path: /Applications/Spark.app/Contents/MacOS/Spark
Identifier: Cisco-Systems.Spark
Version: 1.3244 (3244)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Spark [491]
User ID: 501
Date/Time: 2015-08-19 11:38:43.543 -0700

CI using StackStorm on top of GitHub, Docker and DockerHub

In this blog post, we cover CI part of CICD with Docker as an example. At a high level, this blog post will show you a way to create a docker image and push it to a registry on every commit to a github repo. You've probably read our own James Fryman's excellent blog post on continuous delivery with StackStorm in a more traditional environment. If not, I highly recommend reading it. Before getting into the details, here's some motivation for switching to container based immutable infrastructure.

Motivation

# [freight] adding st2api_0.8.0-5_amd64.deb to pool
# [freight] adding st2auth_0.8.0-5_amd64.deb to pool
# [freight] adding st2common_0.8.0-5_amd64.deb to pool
# [freight] adding st2debug_0.8.0-5_amd64.deb to pool
# [freight] adding st2reactor_0.8.0-5_amd64.deb to pool