Skip to content

Instantly share code, notes, and snippets.

View alexandreroman's full-sized avatar

Alexandre Roman alexandreroman

View GitHub Profile
@alexandreroman
alexandreroman / import-product-to-opsman.md
Created November 13, 2018 01:53
Importing a product to Ops Manager using om CLI

Importing a product to Ops Manager using om CLI

Install om CLI

$ wget -O om https://github.com/pivotal-cf/om/releases/download/0.44.0/om-linux && chmod +x om && sudo mv om /usr/local/bin

Import a product to Ops Manager

$ PRODUCT_FILE=filefrompivnet.pivotal
@alexandreroman
alexandreroman / get-pks-from-pivnet.md
Last active November 15, 2018 08:56
Downloading PKS from Pivotal Network using pivnet CLI

Downloading PKS from Pivotal Network using pivnet CLI

Install pivnet CLI:

$ wget -O pivnet github.com/pivotal-cf/pivnet-cli/releases/download/v0.0.55/pivnet-linux-amd64-0.0.55 && chmod +x pivnet && sudo mv pivnet /usr/local/bin

Login to pivnet:

$ pivnet login --api-token=$PIVNET_TOKEN
@alexandreroman
alexandreroman / credhub-secure-credentials.md
Created October 27, 2018 18:57
Using CredHub service broker to secure credentials on Cloud Foundry

Using CredHub service broker to secure credentials on Cloud Foundry

This document describes how CredHub can be used to secure service credentials used by an application.

Make sure you installed CredHub service broker on your Cloud Foundry foundation.

Install a sample app

For the purpose of securing credentials, we are using a

@alexandreroman
alexandreroman / pcf-azure-osbapi.md
Created October 26, 2018 12:28
Install Azure Open Service Broker for PCF

Installing Azure Open Service Broker for PCF

Import the tile

Download the tile from Pivotal Network. Import the tile using your Ops Manager instance.

Create a Redis database instance

@alexandreroman
alexandreroman / pcf-install-azure.md
Last active October 25, 2018 22:50
Install PAS for Azure

Installing PCF for Azure

This document describes how to manually install Pivotal Cloud Foundry 2.3 for Azure, and how to avoid pitfalls during deployment.

Preparing installation

Install Azure CLI:

$ brew update && brew install azure-cli
@alexandreroman
alexandreroman / pks-gcp-create-cluster.md
Last active September 13, 2019 14:04
Create a K8s cluster with PKS on GCP

Create a K8s cluster with PKS on GCP

Set these environment variables:

$ GCP_REGION=europe-west1; CLUSTER_NAME="pks-demo1"

Assign a public IP address for the load balancer (among master nodes):

$ gcloud compute addresses create ${CLUSTER_NAME}-master-api-ip --region ${GCP_REGION}
@alexandreroman
alexandreroman / gcp-list-instances.sh
Last active January 27, 2022 17:23
List compute instances
gcloud compute instances list --format 'table(name,status,networkInterfaces[].networkIP)'
@alexandreroman
alexandreroman / pks-cookbook.md
Last active October 25, 2018 14:23
PKS cookbook

PKS cookbook

You need to setup PKS API access by creating a user. Make sure the VM hosting PKS Control Plane (PKS API Endpoint) is publicly available.

Login to PKS:

$ pks login -a <PKS API Endpoint> -u <User> -p <Password> --ca-cert <Path to Root Certificate>
@alexandreroman
alexandreroman / k8s-deploy-wordsmith-demo.md
Last active October 25, 2018 14:21
Deploy wordsmith demo from DockerCon EU 17 to K8s

Deploy wordsmith demo to K8s

Wordsmith is the demo project shown at DockerCon EU 2017, where Docker announced that support for Kubernetes was coming to the Docker platform.

The following components will be deployed:

  • db: a PostgreSQL database storing words
  • words: a Java REST API which serves words read from the database
  • web: a Go web application which calls the API and builds words into sentences
@alexandreroman
alexandreroman / gcp-delete-unused-disks.sh
Last active January 27, 2022 17:21
Delete unused compute disks on GCP
gcloud compute disks delete `gcloud compute disks list --filter="-users:*" --format "value(name)"`