Skip to content

Instantly share code, notes, and snippets.

View rasheedamir's full-sized avatar

Rasheed Amir rasheedamir

View GitHub Profile

My Openshift Cheatsheet

Examine the cluster quota defined for the environment:

$ oc describe AppliedClusterResourceQuota

Install pkgs using yum in a Dockerfile

@rasheedamir
rasheedamir / Makefile
Created May 3, 2018 20:59 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@rasheedamir
rasheedamir / install.sh
Created October 22, 2017 09:39 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@rasheedamir
rasheedamir / App.java
Created August 23, 2017 05:35 — forked from thomasdarimont/App.java
Example for using the keycloak Spring Security Adapter (2.4.0.Final) with a Bearer-only Spring Boot App deployed in JBoss EAP
package de.tdlabs.examples;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class App extends SpringBootServletInitializer {
@rasheedamir
rasheedamir / gist:9d801e29fa5e6128883cbaf24c832984
Created August 22, 2017 19:01 — forked from mdisec/gist:b0d44cc14e4c4c10cd64
Kibana with Nginx Reverse Proxy + SSL + HTTP Auth
# Nginx proxy for Elasticsearch + Kibana
#
# In this setup, we are password protecting the saving of dashboards. You may
# wish to extend the password protection to all paths.
#
# Even though these paths are being called as the result of an ajax request, the
# browser will prompt for a username/password on the first request
#
# If you use this, you'll want to point config.js at http://FQDN:443/ instead of
# http://FQDN:9200
@rasheedamir
rasheedamir / remote-ssh-kube-commands.sh
Created July 26, 2017 10:13 — forked from cmcconnell1/remote-ssh-kube-commands.sh
Run remote command_list on all of the specified kubernetes clusters in AWS EC2: controllers, etcd, or workers
#!/usr/bin/env bash
#
# Author: Chris McConnell
#
# Summary:
# Run remote command_list on all of the specified kubernetes clusters: controllers, etcd, or workers.
#
# Why:
# We have kubernetes and want to run CM jobs / commands on the kube nodes, but CoreOS doesnt have python etc. on it so we can't use CM tools here unless we hack 'em up (which shouldn't), so shell always works.
# Plan to continue to build tools on this and we can take output of this script and slurp up into database, feed to graylog, etc.
@rasheedamir
rasheedamir / Makefile
Created June 19, 2017 07:29 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
@rasheedamir
rasheedamir / Cassandra-OpsCenter-Compose.md
Created October 12, 2016 11:35 — forked from disintegrator/Cassandra-OpsCenter-Compose.md
OSX: 3-node Cassandra cluster + OpsCenter using Docker Compose
brew install boot2docker
eval $(boot2docker shellinit)
boot2docker up
sudo pip install -U docker-compose

# put the docker-compose.yml file in a directory e.g. ~/Work/docker/cassandra

cd ~/Work/docker/cassandra
docker-compose up
@rasheedamir
rasheedamir / coreos-windows-share.sh
Last active September 23, 2016 09:56 — forked from pantelis/coreos-windows-share.sh
Mount Windows share drives on CoreOS
# WARNING - THIS IN NOT a SHELL SCRIPT - JUST a LIST of COMMANDS
# based on https://github.com/coreos/coreos-overlay/issues/595 with links updated
# Build cifs-utils in a container and copy it into /tmp on the host.
$docker run -t -i -v /tmp:/host_tmp fedora /bin/bash
# On the container bash prompt
yum groupinstall -y "Development Tools" "Development Libraries"
yum install -y tar
yum install -y bzip2
#!/bin/bash
SERVER_IP=<MY_SERVER_IP>
# copy cloud-config.yml to the server
scp cloud-config.yml core@$SERVER_IP:~/
# validate cloud-config file
ssh core@$SERVER_IP "coreos-cloudinit -validate --from-file ~/cloud-config.yml"
if [[ $? == "0" ]]; then