Skip to content

Instantly share code, notes, and snippets.

View lingxiankong's full-sized avatar

Lingxian Kong lingxiankong

View GitHub Profile
@lingxiankong
lingxiankong / my-linkedin-profile-data.json
Last active May 25, 2024 00:56
My Linkedin profile json data
{
"public_identifier": "lingxiankong",
"first_name": "Lingxian",
"last_name": "Kong",
"full_name": "Lingxian Kong",
"follower_count": 396,
"occupation": "Lead Cloud Consultant at Sourced Group",
"headline": "Lead Cloud Consultant at Sourced Group",
"summary": "- Strong development background in Python (9+ years) and Golang (3+ years)\n- 10+ years of DevOps experience in the cloud computing area\n- Certified Kubernetes Administrator\n- Certified Solutions Architect & Networking Specialty for AWS & Azure & GCP\n- 6+ years of experience of cloud computing open source projects contribution, including Kubernetes, Ansible, Terraform, Gophercloud, OpenStack.\n- Project Technical Lead in OpenStack (2017-2022)\n- OpenStack Cloud Provider Project Technical Lead in Kubernetes (2018-2021)",
"country": "NZ",
#!/bin/sh
set -e
gum style \
--foreground 212 --border-foreground 212 --border double \
--margin "1 2" --padding "2 4" \
'Setup for the
"How To Create A Complete Internal Developer Platform (IDP)?"
video.'
@lingxiankong
lingxiankong / get_aws_cred_in_gcp.py
Last active December 26, 2021 13:13
Get AWS credentials in GCP VM
#!/usr/bin/env python3
import json
import requests
import sys
import boto3
def get_metadata(path: str, parameter: str):
metadata_url = 'http://metadata.google.internal/computeMetadata/v1/{}/{}'.format(path, parameter)
headers = {'Metadata-Flavor': 'Google'}
#!/bin/sh
MYIP=$(ip route get 8.8.8.8 | head -1 | awk '{print $7}')
OUTPUT="Hi, I am $MYIP\r"
LEN=${#OUTPUT}
while true; do echo -e "HTTP/1.1 200 OK\r\nContent-Length: ${LEN}\r\n\r\n${OUTPUT}" | sudo nc -l -p 80; done
@lingxiankong
lingxiankong / k8s-keystone-auth.md
Last active February 6, 2019 12:45
[TEMP] Deploy k8s-keystone-auth

create serviceaccount

mkdir -p /etc/kubernetes/keystone-auth

cat <<EOF > /etc/kubernetes/keystone-auth/serviceaccount.yaml
---
kind: ServiceAccount
apiVersion: v1
metadata:
@lingxiankong
lingxiankong / devstack_compute_local.ini
Last active February 19, 2018 22:26
devstack config file compute
[[local|localrc]]
HOST_IP=
SERVICE_HOST=
RECLONE=False
MYSQL_HOST=$SERVICE_HOST
RABBIT_HOST=$SERVICE_HOST
Q_HOST=$SERVICE_HOST
GLANCE_HOSTPORT=$SERVICE_HOST:9292
DATABASE_PASSWORD=password
@lingxiankong
lingxiankong / magnum_devstack_controller.ini
Last active February 20, 2018 05:05
devstack config file for magnum(controller)
[[local|localrc]]
RECLONE=False
MULTI_HOST=True
HOST_IP=
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas
enable_plugin octavia https://git.openstack.org/openstack/octavia
enable_plugin heat https://git.openstack.org/openstack/heat
enable_plugin barbican https://git.openstack.org/openstack/barbican
enable_plugin magnum https://git.openstack.org/openstack/magnum
@lingxiankong
lingxiankong / kuryr_baremetal_devstack_local.conf
Last active February 8, 2018 04:05
devstack config file for kuryr baremetal installation
[[local|localrc]]
enable_plugin kuryr-kubernetes https://git.openstack.org/openstack/kuryr-kubernetes
# If you do not want stacking to clone new versions of the enabled services,
# like for example when you did local modifications and need to ./unstack.sh
# and ./stack.sh again, uncomment the following
RECLONE=False
# Log settings for better readability
LOGFILE=devstack.log