Coder Social home page Coder Social logo

one-click-integration-script's Introduction

one-click-script

This script aims at resolving issues with one-click-integration in Kyma's certificate retrieval flow.

The script requires only minimal input and automates token fetch, csr generation and http calls to the Connector Service.

Requirements

In order to run the script following command line tools must be available:

  • curl
  • openssl
  • jq
  • base64
  • kubectl

Installation

Brew

Script now has a brew formula! Simply run:

brew tap janmedrek/one-click-integration
brew install one-click-integration

After the installation it's accessible via:

one-click-integration.sh

No need to remember where you've put that pesky file anymore!

Curl

Otherwise you can set up the script with the following command:

curl https://raw.githubusercontent.com/janmedrek/one-click-integration-script/master/one-click-integration.sh > one-click-integration.sh && chmod +x ./one-click-integration.sh

Usage

This script can fetch certificate info in two different ways:

  • using provided url (containing token)
  • using kubeconfig file

Please not that the options are mutually exclusive!

Following parameters are available:

  • url fetch:
    • -u | --url - url with a token generated by connector-service
    • -k | --key - (optional) path to the key file
  • kubeconfig fetch:
    • -c | --config - path to the kubeconfig file
    • -r | --remoteenv - name of remote environment

Examples

url fetch

  • No key file provided:
one-click-integration.sh --url "https://connector-service.kyma.dev.com/v1/remoteenvironments/ec-default/info?token=J0RpZCBoZSBmaXJlIHNpeCBzaG90cyBvciBvbmx5IGZpdmUnPyBXZWxsIHRvIHRlbGwgeW91IHRoZSB0cnV0aCwgaW4gYWxsIHRoaXMgZXhjaXRlbWVudCwgaSBraW5kIG9mIGxvc3QgdHJhY2sgbXlzZWxmLg=="
  • Using existing key file:
one-click-integration.sh --key certificate.key --url "https://connector-service.kyma.dev.com/v1/remoteenvironments/ec-default/info?token=QnV0IGJlaW5nIHRoYXQgdGhpcyBpcyBhIC40NCBNYWdudW0sIHRoZSBtb3N0IHBvd2VyZnVsIGhhbmRndW4gaW4gdGhlIHdvcmxkLCBhbmQgd291bGQgYmxvdyB5b3VyIGhlYWQgY2xlYW4gb2ZmLCB5b3UndmUgZ290IHRvIGFzayB5b3Vyc2VsZiBvbmUgcXVlc3Rpb246ICdEbyBJIGZlZWwgbHVja3k/JyBXZWxsIGRvIHlhLCBwdW5rPw=="

kubeconfig fetch

  • No key file provided:
one-click-integration.sh --config "/Users/username/kubeconfigdir/kubeconfig" -r "re-name"
  • Using existing key file:
one-click-integration.sh --config "/Users/username/kubeconfigdir/kubeconfig" -r "re-name" --key certificate.key

Auto-completion

There is a nice auto-completion script which can be added for increasing the user experience: Auto-completion for one-click-integration.

Simply add the following command to your profile script:

source ./one-click-integration-script-completion.bash

one-click-integration-script's People

Contributors

janmedrek avatar franpog859 avatar abbi-gaurav avatar schulzh avatar szymongib avatar

Watchers

James Cloos avatar Lukasz Szymik avatar

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.