openshift-azure

module
Version: v10.1.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2019 License: Apache-2.0

README

openshift-azure

Coverage Status Go Report Card GoDoc

Prerequisites

Note that this README is targeted at AOS-Azure contributors. If you are not a member of this team, these instructions may not work as they will assume you have permissions that you may not have.

  1. Utilities. Install the following:

    1. Golang 1.11.6 (can also use package manager)
    2. Latest Azure CLI
    3. OpenShift Origin 3.11 client tools (can also use package manager)
    4. Latest Glide. Note: Glide 0.13.1 is known to be broken.
    5. jq (can also use package manager)

    Development helper scripts assume an up-to-date GNU tools environment. Recent Linux distros should work out-of-the-box.

    macOS ships with outdated BSD-based tools. We recommend installing macOS GNU tools.

  2. Environment variables. Ensure that $GOPATH/bin is in your path:

    export PATH=$PATH:${GOPATH:-$HOME/go}/bin.

  3. Azure CLI access. Log into Azure using the CLI using az login and your credentials.

  4. OpenShift CI cluster access. Log in to the CI cluster using oc login and a token from the CI cluster web interface. You can copy the required command by clicking on your username and the "Copy Login Command" option in the web portal.

  5. Codebase. Check out the codebase:

    go get github.com/openshift/openshift-azure/...

  6. Secrets. Retrieve cluster creation secrets from the CI cluster:

    cd ${GOPATH:-$HOME/go}/src/github.com/openshift/openshift-azure
    make secrets
    
  7. Environment file. Create an environment file:

    cp env.example env.

  8. AAD Application / Service principal. Create a personal AAD Application:

    1. hack/aad.sh app-create user-$USER-aad aro-team-shared
    2. Update env to include the AZURE_AAD_CLIENT_ID and AZURE_AAD_CLIENT_SECRET values output by aad.sh.
    3. Ask an AAD administrator to grant permissions to your application.

Deploy an OpenShift cluster

  1. Source the env file: . ./env.

  2. Determine an appropriate resource group name for your cluster (e.g. for a test cluster, you could call it $USER-test). Then export RESOURCEGROUP and run ./hack/create.sh $RESOURCEGROUP to deploy a cluster.

  3. Access the web console via the link printed by create.sh, logging in with your Azure credentials.

  4. To inspect pods running on the OpenShift cluster, run KUBECONFIG=_data/_out/admin.kubeconfig oc get pods.

  5. To ssh into any OpenShift master node, run ./hack/ssh.sh. You can directly ssh to any other host from the master. sudo -i will give root.

  6. Run ./hack/delete.sh to delete the deployed cluster.

Examples

Basic OpenShift configuration (also see test/manifests/fakerp/create.yaml):

name: openshift
location: $AZURE_REGION
properties:
  openShiftVersion: v3.11
  authProfile:
    identityProviders:
    - name: Azure AD
      provider:
        kind: AADIdentityProvider
        clientId: $AZURE_AAD_CLIENT_ID
        secret: $AZURE_AAD_CLIENT_SECRET
        tenantId: $AZURE_TENANT_ID
  networkProfile:
    vnetCidr: 10.0.0.0/8
  masterPoolProfile:
    count: 3
    vmSize: Standard_D2s_v3
    subnetCidr: 10.0.0.0/24
  agentPoolProfiles:
  - name: infra
    role: infra
    count: 3
    vmSize: Standard_D2s_v3
    subnetCidr: 10.0.0.0/24
    osType: Linux
  - name: compute
    role: compute
    count: 1
    vmSize: Standard_D2s_v3
    subnetCidr: 10.0.0.0/24
    osType: Linux

CI infrastructure

Read more about how to work with our CI system here.

For any infrastructure-related issues, make sure to contact the Developer Productivity team who is responsible for managing the OpenShift CI Infrastructure at #forum-testplatform in Slack.

Directories

Path Synopsis
cmd
hack
pkg
api
Package api defines the external API for the plugin.
Package api defines the external API for the plugin.
arm
arm/v10
Package arm Code generated by go-bindata.
Package arm Code generated by go-bindata.
arm/v7
Package arm Code generated by go-bindata.
Package arm Code generated by go-bindata.
arm/v71
Package arm Code generated by go-bindata.
Package arm Code generated by go-bindata.
arm/v9
Package arm Code generated by go-bindata.
Package arm Code generated by go-bindata.
fakerp
Package fakerp Code generated by go-bindata.
Package fakerp Code generated by go-bindata.
plugin
Package plugin holds the implementation of a plugin.
Package plugin holds the implementation of a plugin.
startup/v10
Package startup Code generated by go-bindata.
Package startup Code generated by go-bindata.
startup/v7
Package startup Code generated by go-bindata.
Package startup Code generated by go-bindata.
startup/v71
Package startup Code generated by go-bindata.
Package startup Code generated by go-bindata.
startup/v9
Package startup Code generated by go-bindata.
Package startup Code generated by go-bindata.
sync/v10
Package sync Code generated by go-bindata.
Package sync Code generated by go-bindata.
sync/v7
Package sync Code generated by go-bindata.
Package sync Code generated by go-bindata.
sync/v71
Package sync Code generated by go-bindata.
Package sync Code generated by go-bindata.
sync/v9
Package sync Code generated by go-bindata.
Package sync Code generated by go-bindata.
util/jsonpath
Code generated by goyacc -l -o parser.go -v /dev/null parser.y.
Code generated by goyacc -l -o parser.go -v /dev/null parser.y.
util/mocks/mock_arm
Package mock_arm is a generated GoMock package.
Package mock_arm is a generated GoMock package.
util/mocks/mock_azureclient
Package mock_azureclient is a generated GoMock package.
Package mock_azureclient is a generated GoMock package.
util/mocks/mock_azureclient/mock_authorization
Package mock_authorization is a generated GoMock package.
Package mock_authorization is a generated GoMock package.
util/mocks/mock_azureclient/mock_compute
Package mock_compute is a generated GoMock package.
Package mock_compute is a generated GoMock package.
util/mocks/mock_azureclient/mock_dns
Package mock_dns is a generated GoMock package.
Package mock_dns is a generated GoMock package.
util/mocks/mock_azureclient/mock_graphrbac
Package mock_graphrbac is a generated GoMock package.
Package mock_graphrbac is a generated GoMock package.
util/mocks/mock_azureclient/mock_insights
Package mock_insights is a generated GoMock package.
Package mock_insights is a generated GoMock package.
util/mocks/mock_azureclient/mock_keyvault
Package mock_keyvault is a generated GoMock package.
Package mock_keyvault is a generated GoMock package.
util/mocks/mock_azureclient/mock_network
Package mock_network is a generated GoMock package.
Package mock_network is a generated GoMock package.
util/mocks/mock_azureclient/mock_operationalinsights
Package mock_operationalinsights is a generated GoMock package.
Package mock_operationalinsights is a generated GoMock package.
util/mocks/mock_azureclient/mock_resources
Package mock_resources is a generated GoMock package.
Package mock_resources is a generated GoMock package.
util/mocks/mock_azureclient/mock_storage
Package mock_storage is a generated GoMock package.
Package mock_storage is a generated GoMock package.
util/mocks/mock_azureclient/mock_vaultmgmt
Package mock_vaultmgmt is a generated GoMock package.
Package mock_vaultmgmt is a generated GoMock package.
util/mocks/mock_cluster
Package mock_cluster is a generated GoMock package.
Package mock_cluster is a generated GoMock package.
util/mocks/mock_config
Package mock_config is a generated GoMock package.
Package mock_config is a generated GoMock package.
util/mocks/mock_kubeclient
Package mock_kubeclient is a generated GoMock package.
Package mock_kubeclient is a generated GoMock package.
util/mocks/mock_scaler
Package mock_scaler is a generated GoMock package.
Package mock_scaler is a generated GoMock package.
util/mocks/mock_startup
Package mock_startup is a generated GoMock package.
Package mock_startup is a generated GoMock package.
util/mocks/mock_updateblob
Package mock_updateblob is a generated GoMock package.
Package mock_updateblob is a generated GoMock package.
util/mocks/mock_wait
Package mock_wait is a generated GoMock package.
Package mock_wait is a generated GoMock package.
util/mocks/mock_writers
Package mock_writers is a generated GoMock package.
Package mock_writers is a generated GoMock package.
util/statsd
Package statsd implements the modified statsd protocol documented at https://genevamondocs.azurewebsites.net/collect/references/statsdref.html
Package statsd implements the modified statsd protocol documented at https://genevamondocs.azurewebsites.net/collect/references/statsdref.html
vmimage
Package vmimage Code generated by go-bindata.
Package vmimage Code generated by go-bindata.
test
reporters
Package reporters implements gingo Reporter for Azure App Insights
Package reporters implements gingo Reporter for Azure App Insights

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL