Skip to content

Instantly share code, notes, and snippets.

View asmacdo's full-sized avatar

Austin Macdonald asmacdo

  • Dartmouth College
View GitHub Profile
title linkTitle weight
Ansible Operator Tutorial
Tutorial
3

This tutorial walks operator authors through the entire process of:

  • building a simple Ansible-based operator using the operator sdk scaffolding
  • deploying and using the operator on a cluster.

Quickstart

This section will demonstrate how to use the operator-sdk to quickly scaffold a simple Ansible-based operator that extends the Kubernetes API, allowing users to deploy Memcached by creating a custom Kubernetes resource.

Installation

See osdk install and then install the additional Ansible-operator

@asmacdo
asmacdo / python-readiness.html
Created April 15, 2019 14:51
Overview of Pulp Python plugin features, and their readiness for integration
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.collapsible {
background-color: #FFF;
color: blue;
cursor: pointer;
padding: 8px;
@asmacdo
asmacdo / main.py
Last active January 4, 2019 23:04
riddler wtf bits
import math
import pygame
BLUE = (0, 0, 255)
RED = (255, 0, 0)
class Bit:
# Verify clean
http http://dev.pulp3:8000/pulp/api/v3/repositories/
# Make a repo
http POST http://dev.pulp3:8000/pulp/api/v3/repositories/ name=my-python-repo
export REPO_HREF=$(http http://dev.pulp3:8000/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "my-python-repo") | ._href')
# doitlive env: REPO_HREF=$(http http://dev.pulp3:8000/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "my-python-repo") | ._href')
http $REPO_HREF
# Make a remote

Overview:

With the introduction of Mongoengine, we are creating a formal model layer in pulp. This allows us the opportunity to move code to better fit a traditional MVC design. Django and Mongoengine have differing ideas about MVC and many of the terms associated with it are overloaded, making any discussion potentially ambiguous. This proposal attempts to clarify which behaviors belong where and to define the flavor of MVC that Pulp will use going forward.

I have chosen Repository update as an example of how I intend separate the logic.

@asmacdo
asmacdo / main.yml
Created August 1, 2014 14:47
Create multiple directories with ansible
- name: Make sure the sites-available, sites-enabled and conf.d directories exist
file:
path: "{{nginx_dir}}/{{item}}"
owner: root
group: root
mode: 0755
recurse: yes
state: directory
with_items: ["sites-available", "sites-enabled", "conf.d"]

###Overview This tutorial will provide you with an overview of the recommended Git workflow. We will be using the the HGrid repository to provide a real world example.

####What you'll learn:

  1. Forking repositories to your account
  2. Cloning freshly forked repos to your machine
  3. Adding remotes
  4. Adding and deleting branches
  5. Merging local branches