Skip to content

Instantly share code, notes, and snippets.

View herlo's full-sized avatar

Clint Savage herlo

View GitHub Profile
[herlo@t480s (master) k8s-infrastructure]$ curl -sX GET -H "Authorization: Token ${TOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/herlo-test/prow-infra
{
"id": 406539490,
"node_id": "MDEwOlJlcG9zaXRvcnk0MDY1Mzk0OTA=",
"name": "prow-infra",
"full_name": "herlo-test/prow-infra",
"private": false,
"owner": {
"login": "herlo-test",
"id": 90730759,
(tmp_smalibs) [herlo@t480s sma.pb]$ pip install .
Processing /home/herlo/Projects/smalibs-poetry/pkgs/sma.pb
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /home/herlo/.venvs/tmp_smalibs/bin/python3 /home/herlo/.venvs/tmp_smalibs/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp0zb4u90x
cwd: /tmp/pip-req-build-s69zj75p
Complete output (16 lines):
Traceback (most recent call last):
[herlo@t480s pkgs]$ ls
sma.exceptions sma.pb sma.rundeck sma.utils
[herlo@t480s pkgs]$ cd sma.pb/
[herlo@t480s sma.pb]$ cat pyproject.toml
[tool.poetry]
name = "sma.pb"
version = "0.1.0"
description = ""
authors = ["Clint Savage <myemail>"]
license = "proprietary"
@herlo
herlo / CLI
Created October 12, 2018 14:49
LinchPin Validate: [ERROR] topology valid
$ linchpin fetch git://github.com/herlo/lp_test_workspace --dest /tmp
destination workspace: /tmp/768_4d2a
$ cd /tmp/768_4d2a
$ ls
multi-target openstack os-server-addl-vols
$ cd openstack/
$ ls
PinFile README.rst
$ linchpin validate
[ERROR] topology valid
@herlo
herlo / PinFile.os-server-addl-vols
Last active August 10, 2018 20:32
PinFile and output for inventory issue while testing os-server additional volumes feature
$ cat PinFile
---
os-server-addl-vols:
topology:
topology_name: os-server-addl-vols
resource_groups:
- resource_group_name: os-server-addl-vols
resource_group_type: openstack
resource_definitions:
- name: "test-addl-vols"

Automated Testing of LinchPin

LinchPin has automated testing from PR's (Pull Requests) in GitHub. Whenever a PR is updated or the trigger phrase '[test]' is included in the comment a set of tests will be kicked off. These tests are orchestrated via jenkins in the Centos CI openshift environment.

The point of these tests is to verify that LinchPin works correctly in a variety of different environments. We currently exercise current releases of both Centos and Fedora. On those distros we test the following providers: dummy, duffy, aws, libvirt, openstack, and beaker. We are continuing to expand this.

These distros are provided as containers which are deployed inside the openshift environment.

@herlo
herlo / linchpin_environment_context
Last active March 1, 2018 17:58
Linchpin Environment / Context Values Exposed to Users
Purpose
-------
As part of the request in https://github.com/CentOS-PaaS-SIG/linchpin/issues/448, I've done some preliminary research, interviews, and brainstorming sessions.
It's become obvious that linchpin needs to provide additional components to make environmental variables available. Additionally, it seems there's a common need for a context to provide data to external resources, be it environment variables, LinchPin hooks, or some other method of exporting the values from within LinchPin after a provisioning/teardown action. As such, this proposal is being presented for comment.
The LinchPin Context
--------------------
Dynamic topologies using json or somesuch which is created on the fly.
Overriding PinFile and topology values
Multi topologies combined into one from the PinFile perspective (maybe make it a big json blob or somesuch)
Dynamic inventories
Template topologies and PinFiles
Possibly remove PinFile as requirement instead provide a script that could be the PinFile / Topology input
@herlo
herlo / minion
Last active December 15, 2015 05:29
minion configuration
file_client: local
file_roots:
base:
- states
pillar_roots:
base:
- pillar
@herlo
herlo / cleanup-gpg-keys.sh
Last active August 29, 2015 14:25
Clean up gpg keys a bit...
#!/bin/bash
# clean_keyring.sh - clean up all the excess keys
# my key should probably be the first secret key listed
#mykey=$(gpg --list-secret-keys | grep '^sec' | cut -c 13-20 | head -1)
mykeys=($(gpg --list-secret-keys | grep '^sec' | cut -c 13-20))
if
[ "${#mykeys[@]}" -eq '0' ]
then
# exit if no key string