Skip to content

Instantly share code, notes, and snippets.

View vpavlin's full-sized avatar

Vaclav Pavlin vpavlin

View GitHub Profile
---
specversion: 0.0.1-alpha
# 0.0.1-alpha requires:
# - Docker 1.6 or later
# - OpenShift3 0.4 or later
# - Atomic Host 7.1.1 or later
specversion: 0.0.1-alpha
id: wordpress-app
@vpavlin
vpavlin / atomicapp.md
Created September 18, 2015 18:07
Atomic App re-design

Re-architecting of Atomic App

Steps

  1. Create a tool to generate Python classes from the json spec
  2. Drop install, run modules, prepare operations module
  • load - loads Nulecule and creates objects from generated classes, if a component is external, pull and process the source (i.e. whole Nulecule graph tree should be available as objects after load finishes)
  • create_transaction - traverse the graph and generate a list of components representing a serialized graph
  • install - unpack files to disk
  • run - deploy to provider(s) (i.e. loop through component list generated by create_transaction and run provider plugin)

Keybase proof

I hereby claim:

  • I am vpavlin on github.
  • I am vpavlin (https://keybase.io/vpavlin) on keybase.
  • I have a public key whose fingerprint is 91B9 C409 0579 1524 0D6A 09ED DF76 0961 C5ED C264

To claim this, I am signing this object:

@vpavlin
vpavlin / nulecule-index.md
Last active November 10, 2015 15:37
Architecture of Nulecule Index

Nulecule Index

A list of metadata objects describing Nulecule apps/components easily accessible by users (developers, ops).

What am I reading?

You are reading an architecture overview for an Index implementation I proposed in two pull requests:

    kojiclient = koji.ClientSession('http://koji.fedoraproject.org/kojihub', {})
    r = kojiclient.search("osbs-client", "package", "glob")
    r = kojiclient.listBuilds(r[0]["id"])
    for b in r:
        if b["version"] == "0.23":
            l = kojiclient.listBuildRPMs(b["build_id"])
            for i in l:
                if i["arch"] == "src":
 print("https://kojipkgs.fedoraproject.org//packages/%s/%s/%s/%s/%s.src.rpm" %(i["name"], i["version"], i["release"], i["arch"], i["nvr"]))
FROM centos:7
MAINTAINER Vasek Pavlin <vasek@redhat.com>
VOLUME ['/target']
CMD ['/usr/bin/bash']
RUN mkdir -p /opt/obsidian &&\
chown 1000:1000 /opt/obsidian
WORKDIR /opt/obsidian

First of all....

sudo setenforce 0
MYIP=<insert_ip_of_the_machine_running_your_cluster_here>

Bring the cluster up, make developer cluster admin and deploy

for l in `cat $1`; do
curl -o ${l%%;*} ${l##*;}
done
def appName="voting-app"
def project=""
def tag="blue"
def altTag="green"
def verbose="true"
node {
project = env.PROJECT_NAME
stage("Initialize") {
sh "oc get route ${appName} -n ${project} -o jsonpath='{ .spec.to.name }' --loglevel=4 > activeservice"
activeService = readFile('activeservice').trim()
from saasherder.saasherder import SaasHerder
import requests
import json
builds = []
se = SaasHerder("services", "templates")
services = se.get_services("all")
for s in services: