Skip to content

Instantly share code, notes, and snippets.

View miabbott's full-sized avatar

Micah Abbott miabbott

View GitHub Profile
@miabbott
miabbott / add-rhelah-storage-non-destructive
Created June 4, 2015 15:51
Adding storage to RHELAH non-desctructively
1. Create new file based disk. This creates a 10G sparsely allocated disk.
$ sudo dd if=/dev/zero of=/var/lib/libvirt/images/rhelah_7.1.2_extra.img bs=1M seek=10240 count=0
2. Create a KVM disk config
$ cat rhelah_7.1.2_extra.xml
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/var/lib/libvirt/images/rhelah_7.1.2_extra.img'/>
@miabbott
miabbott / kube-contrb-ansible-atomic.md
Last active January 4, 2016 15:51
Changes for kubernets/contrib/ansible on Fedora + RHEL Atomic
  1. Add IP/hostname to inventory file
  2. Edit group_vars/all.yml
  • change - source_type: packageManager
  • change - cluster_logging: false
  • change - cluster_monitoring: false
  1. Edit roles/kubernetes/defaults/main.yml
  • change - kube_master_api_port: 6443
  1. Edit roles/master/templates/apiserver.j2
  • change - KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0"
  1. Edit /etc/hosts on VM
Setting up:
1. ostree remote add --set=gpg-verify=false centos-atomic-continuous https://ci.centos.org/artifacts/sig-atomic/rdgo/centos-continuous/ostree/repo/
2. ostree pull centos-atomic-continuous:centos-atomic-host/7/x86_64/devel/continuous
3. ostree commit -b my-test-branch --tree=ref=centos-atomic-continuous:centos-atomic-host/7/x86_64/devel/continuous
(if your ostree has `refs --create`, then this can be shortened to: ostree refs centos-atomic-host/7/x86_64/devel/continuous --create=my-test-branch)
4. ostree admin deploy my-test-branch
5. reboot
Synthesizing an update:
@miabbott
miabbott / compose_f25.txt
Created September 20, 2016 15:48
Composing an F25 tree
# git clone https://pagure.io/fedora-atomic.git
# cd fedora-atomic
# git checkout f25
# mkdir -p /srv/f25ah
# ostree init --repo=/srv/f25ah --mode=archive-z2
# rpm-ostree compose tree --repo=/srv/f25ah /path/to/fedora-atomic/checkout/fedora-atomic-docker-host.json
# ostree summary --repo=/srv/f25ah -u
# ostree trivial-httpd -d -P 9001 /srv/f25ah
# systemctl mask rpm-ostreed
# env OSTREE_DEBUG_HTTP=1 /usr/libexec/rpm-ostreed -d
In a separate terminal:
# rpm-ostree rebase <refspec>
@miabbott
miabbott / test_atomic.sh
Last active May 15, 2017 18:06
Setup for testing atomic from source
#!/bin/bash
set -xeou pipefail
dnf -y upgrade
dnf -y builddep atomic
dnf -y install git python python-docker-py libselinux-python redhat-rpm-config python-devel libffi-devel python-gobject-base python2-rpm docker skopeo runc
git config --global user.email "[email protected]"
git config --global user.name "Atomic User"
if [ -d atomic ]; then
cd atomic
git reset --hard HEAD
@miabbott
miabbott / setup_atomic_cli.sh
Created February 7, 2017 18:03 — forked from baude/setup_atomic_cli.sh
Setup an Atomic CLI test environment
#/bin/bash
# Allows user to setup a fresh atomic CLI environment on an atomic
# or cloud system.
# Usage:
# Pull projectatomic/atomic master and install it
# $ sh setup_atomic_cli.sh
# Pull a user's branch
# $ BRANCH=<branch> GIT_USER=<user> sh setup_atomic_cli.sh
@miabbott
miabbott / snkcsc.md
Last active February 6, 2018 20:16
Single Node Kubernetes Cluster with System Containers
  1. Pull system containers
atomic pull --storage ostree registry.fedoraproject.org/f27/kubernetes-apiserver
atomic pull --storage ostree registry.fedoraproject.org/f27/kubernetes-controller-manager
atomic pull --storage ostree registry.fedoraproject.org/f27/kubernetes-kubelet
atomic pull --storage ostree registry.fedoraproject.org/f27/kubernetes-proxy
atomic pull --storage ostree registry.fedoraproject.org/f27/kubernetes-scheduler                                                                                                                            
atomic pull --storage ostree registry.fedoraproject.org/f27/etcd
@miabbott
miabbott / oci-thunderdome.md
Last active March 5, 2018 16:48
The Many Ways to Build an OCI Image without Docker

title: The Many Ways to Build an OCI Image without Docker author: miabbott date: 2018-03-06 00:00:00 UTC published: true comments: false tags:

  • atomic
  • buildah
  • containers
@miabbott
miabbott / pirate-mirror.md
Created March 3, 2018 15:44
Creating a 'Pirate' Mirror of Fedora Atomic Workstation Content

In the #atomic channel, I've seen a few complaints about slow speeds when trying to fetch the Fedora Atomic Workstation (FAW) content from the official sources. Especially when connecting from a location in Europe. This is a two-fold problem. First, the official FAW content is located in a datacenter in Phoenix, Arizona in the United States. Second, the FAW content is not mirrored as part of the official Fedora mirror network.

It is discouraging to see users who want to participate in the Project Atomic community being frustrated with slow speeds, so I decided I would investigate how to mirror the content in the European region.