Giter Club home page Giter Club logo

machine-api-provider-powervs's Introduction

Machine API Provider Power VS

This repository contains implementations of Power VS Provider for the OpenShift machine-api.

This provider runs as a machine-controller deployed by the machine-api-operator

How to build the images in the RH infrastructure

The Dockerfiles use as builder in the FROM instruction which is not currently supported by the RH's docker fork (see kubernetes-sigs/kubebuilder#268). One needs to run the imagebuilder command instead of the docker build.

Note: this info is RH only, it needs to be backported every time the README.md is synced with the upstream one.

Deploy machine API plane with kubernetes cluster

  1. Deploying the cluster

    Use any existing mechanism for deploying the kubernetes cluster, e.g: kubeadm https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/

  2. Deploying machine API controllers

    For development purposes the powervs machine controller itself will run out of the machine API stack. Otherwise, docker images needs to be built, pushed into a docker registry and deployed within the stack.

    To deploy the stack:

    kustomize build config | kubectl apply -f -
    
  3. Deploy secret with Power VS credentials

    Power VS nodeupdate controller assumes existence of a secret file:

    apiVersion: v1
    kind: Secret
    metadata:
      name: powervs-credentials
      namespace: openshift-machine-api
    type: Opaque
    data:
      ibmcloud_api_key: FILLIN

    You can use examples/render-powervs-secrets.sh script to generate the secret:

    # Set the IBMCLOUD_API_KEY with a proper IBM Cloud API Key
    $ IBMCLOUD_API_KEY=<API_KEY> ./examples/render-powervs-secrets.sh examples/addons.yaml | kubectl apply -f -

    Go to How to create IBM Cloud API Key for creating API Key

  4. Test by creating example machine

    # Update the relevant fields like serviceInstanceID, imageID, subnets, keyName etc.. 
    $ kubectl create -f examples/machine-with-user-data.yaml
    $ kubectl create -f examples/userdata.yml

Test locally built powervs actuator

  1. Tear down machine-controller

    Deployed machine API plane (machine-api-controllers deployment) is (among other controllers) running machine-controller. In order to run locally built one, simply edit machine-api-controllers deployment and remove machine-controller container from it.

  2. Build and run powervs actuator from outside the cluster

    $ go build -o bin/machine-controller-manager github.com/openshift/machine-api-provider-powervs/cmd/manager
    $ .bin/machine-controller-manager --kubeconfig ~/.kube/config --logtostderr -v 5 -alsologtostderr

    If running in container with podman, or locally without docker installed, and encountering issues, see hacking-guide.

How to create IBM Cloud API Key

Method 1: Create an API Key via IAM

https://cloud.ibm.com/docs/account?topic=account-userapikey&locale=en#create_user_key

Method 2: Create an API Key via Service Account

machine-api-provider-powervs's People

Contributors

openshift-merge-robot avatar karthik-k-n avatar mkumatag avatar openshift-ci[bot] avatar openshift-merge-bot[bot] avatar damdo avatar hamzy avatar jaypoulz avatar clnperez avatar joelspeed avatar deepsm007 avatar lobziik avatar jthiatt avatar racheljpg avatar radekmanak avatar sebwoj avatar

Stargazers

 avatar

Watchers

Brenton Leanhardt avatar Michal Fojtik avatar Mrunal Patel avatar Rafael F. avatar Karanbir Singh avatar James Cloos avatar Hiro Miyamoto avatar Paul Bastide avatar Sudeesh John avatar Eric Paris avatar Manoj Kumar avatar Sudha Ponnaganti avatar  avatar Sajauddin Mohammad avatar Justin Pierce avatar  avatar  avatar

machine-api-provider-powervs's Issues

Provider id is not set correctly when using PowerVSMachineProviderConfig.ServiceInstance

When the machine is created by supplying ServiceInstance.ID or Name, The machine provider id the serviceinstance will be empty

For example:
Expected format: ibmpowervs://region/zone/service_instance_id/powervs_machine_id
Actual format: ibmpowervs://region/zone//powervs_machine_id

Add a check to validate non empty service instance id before forming a ProviderID

Reference:

providerID := client.FormatProviderID(r.powerVSClient.GetRegion(), r.powerVSClient.GetZone(), r.providerSpec.ServiceInstanceID, *instance.PvmInstanceID)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.