Skip to content

Instantly share code, notes, and snippets.

## OpenShift4 pull-secret:
1. Download your pull-secret from [console.redhat.com](https://console.redhat.com/openshift/install/aws/installer-provisioned)
- click on “Download Pull Secret”. Save it somewhere, e.g. ~/some-dir/pull-secret
2. Add the apps.ci auth to pull-secret! _internal OpenShift developers only_
- Obtain an API token by visiting https://oauth-openshift.apps.ci.l2s4.p1.openshiftapps.com/oauth/token/request
copy the oc login cmd and paste in terminal to login to the ci cluster, then run this:
- `$ oc registry login --to ~/some-dir/pull-secret`
This will append the auth from registry.ci.openshift.org to your cloud.openshift.com pull-secret but it will also
make the pull-secret multi-line.
@weshayutin
weshayutin / .Cluster Scripts.md
Last active May 23, 2024 11:57 — forked from sanchezl/.Cluster Scripts.md
Cluster Creation Scripts

Cluster Creation Scripts

Scripts to use as inspiration for your own OpenShift clusters.

Setup

  1. Create a directory with the name of the cluster you want to create.
  2. Generate an install-config.yaml (for example, using openshift-install create install-configs).
  3. Copy your install-config.yaml to install-config.yaml.save. This ensures you still have a copy after the installer deletes install-config.yaml. Add a bin/ subdirectory and add it to the begining of your PATH. I recommend you use [direnv][1] to manage this (sudo dnf install direnv).
@weshayutin
weshayutin / scan-ansible-archive for modules.py
Created July 15, 2021 20:33 — forked from cloudnull/scan-ansible-archive-for-modules.py
quick and dirty tool to scan an ansible archive and return a complete list of modules used throughout the archive.
import argparse
import collections
import os
import yaml
MODULES = collections.defaultdict(int)
POP_ITEMS = ['always',
'args',
@weshayutin
weshayutin / tripleo-repo-scraper.sh
Created December 8, 2020 21:06 — forked from cloudnull/tripleo-repo-scraper.sh
tripleo repo scraper
COMMIT_MSG="The lower constraint file has been removed
This file, and its tests, are not useful for tripleo so we're
removing because they're now becoming problematic."
git clone https://github.com/openstack/governance
pushd governance
python <<EOC
import yaml
@weshayutin
weshayutin / Search my gists.md
Created October 16, 2019 21:09 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files. language:html

@weshayutin
weshayutin / tmux-cheatsheet.markdown
Last active October 18, 2019 16:51 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

settings

bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
@weshayutin
weshayutin / move_bugs.py
Created September 26, 2019 16:58 — forked from mwhahaha/move_bugs.py
tripleo-move-bugs
#!/usr/bin/env python
from __future__ import print_function
# Example usage:
# python move_bugs.py --no-dry-run --priority-less-than High tripleo stein-3 train-1
# python move_bugs.py --no-dry-run tripleo stein-3 stein-rc1
# python move_bugs.py --no-dry-run --priority-less-than High tripleo stein-rc1 train-1
# python move_bugs.py --no-dry-run --priority-less-than Critical tripleo stein-rc1 train-1
# python move_bugs.py --no-dry-run tripleo stein-rc1 train-1
import argparse
import hudson.model.*
def q = Jenkins.instance.queue
q.items.each {
if (it =~ /deploy-to/) {
q.cancel(it.task)
}
}
@weshayutin
weshayutin / gist:8504cdb66a5db3bb7c6b1b4c30561d13
Created September 29, 2017 21:05 — forked from jimleitch01/gist:cf844a5d78f97073539d
Script to delete and re-create openstack users and networks
#!/bin/bash
#Script to delete and re-create openstack users and networks
. ~/keystonerc_admin
echo "================"
echo "running $0"
echo "About to really clean up, type "yes" to continue"
read CONTINUE

Developing a new Composable Service with Tripleo-Quicstart

In order to develop a new composable service for Tripleo, you need to:

  • Develop the new Heat templates
  • Ensure any required software is packaged
  • Develop appropriate Puppet modules for installing/configuring the packages
  • Deploy an undercloud using your new Heat templates
  • Deploy an overcloud with your new Puppet modules and any