Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am oldarmyc on github.
* I am oldarmyc (https://keybase.io/oldarmyc) on keybase.
* I have a public key whose fingerprint is 95DF 08CF FFFD 1430 FD0D 735C F024 5A3B 833F 1F8C
To claim this, I am signing this object:
@oldarmyc
oldarmyc / gist:67bb93f1832597fd8ed8fb40ecf93361
Created November 2, 2018 16:04
Getting all users in keycloak
kubectl get pods . # Get the postgres pod
kubectl exec -it anaconda-enterprise-postgres-68b49746ff-fv7qk /bin/bash
su - postgres
psql
\c anaconda_auth
select email, enabled, first_name, last_name, username from user_entity;
All table headings incase you want to change the select.
id, emai, email_constraint, email_verified, enabled, federation_link, first_name, last_name, realm_id, username, created_timestamp, service_account_client_link, not_before
@oldarmyc
oldarmyc / instructions.md
Last active November 9, 2018 18:41
SSL certs by hand AE5

To edit/set the SSL certificates by hand.

Before you being ensure that openjdk is installed. At the time of this java-1.8.0-openjdk is the current version on CentOS 7.5

yum install java-1.8.0-openjdk -y

Ensure you have your certificate and private key on the system you are running these commands.

@oldarmyc
oldarmyc / nfs_instructions.md
Created November 21, 2018 14:17
NFS and AE5 instructions

On host server for NFS

yum install nfs-utils nfs-utils-lib -y

Create dir for nfs share and set permissions

mkdir /nfs
chmod 655 /nfs
chown nfsnobody:nfsnobody /nfs
@oldarmyc
oldarmyc / join_cluster.md
Last active November 27, 2018 20:35
Join cluster via command line

Joining additional node to AE5 master through command line

Download the corresponding gravity binary from S3

# For AE 5.2.1
curl -O https://s3.amazonaws.com/ae-support/gravity-binary-5.2.1

# For AE 5.2.2
curl -O https://s3.amazonaws.com/ae-support/gravity-binary-5.2.2
@oldarmyc
oldarmyc / move_gravity.md
Created November 28, 2018 18:21
Move/replace /var/lib/gravity

Changing out /var/lib/gravity

In the example below /dev/sdb was presented to the VM. You would use whatever disk was presented in your setup.

  1. Get the disks presented to the system
fdisk -l
  1. Create the partition on the disk. Using fdisk but you can use others i.e. gdisk
@oldarmyc
oldarmyc / example.py
Created December 10, 2018 18:10
MSSQL example connector
"""
In order to use the example you must install pymssql from conda
conda install -c anaconda pymssql
"""
import pymssql
# Using an ini style credentials file for example so will use configparser
import configparser
@oldarmyc
oldarmyc / snowflake.py
Created December 10, 2018 18:13
Snowflake example connection
"""
Installing the connector it is recommended to use pip and not the conda-forge package
pip install snowflake-connector-python
"""
import snowflake.connector
import json
# Get credentials from kubernetes. The credentials were setup as a dictionary so will use json to load
@oldarmyc
oldarmyc / mongo.py
Created December 10, 2018 18:16
Mongo connection example
"""
pymongo will need to be installed from conda for things to work properly
conda install -c anaconda pymongo
"""
import pymongo
import json
"""
Connect to the mongo server. In the example it is using the default auth mechanism
@oldarmyc
oldarmyc / postgresql.py
Created December 10, 2018 18:19
PostgreSQL example connection
"""
Package psycopg2 must be installed through conda for this to work
conda install -c anaconda psycopg2
"""
import psycopg2
import json
# Get credentials from kubernetes. The credentials were setup as a dictionary