Giter Club home page Giter Club logo

blueprints's Introduction

Prerequisites

  1. An OpenShift cluster ( Go to https://console.redhat.com/openshift/create )
  2. (Optional) A second OpenShift cluster
  3. A github account
  4. A quay account

The use of this blueprint depends on having at least one running Red Hat OpenShift cluster. It is desirable to have a cluster for deploying the data center assets and a seperate cluster(s) for the factory assets.

If you do not have a running Red Hat OpenShift cluster you can start one on a public or private cloud by using Red Hat's cloud service.

How to use

  1. Fork this repo on GitHub. It is necessary to fork because your fork will be updated as part of the GitOps and DevOps processes.

  2. Clone the forked copy

    git clone [email protected]:your-username/blueprints.git

  3. Create a local copy of the Helm values file that can safely include credentials

DO NOT COMMIT THIS FILE You do not want to push personal credentials to GitHub.

cp blueprints/manufacturing-edge-ai-ml/main/values.yaml ~/values-secret.yaml
vi ~/values-secret.yaml
  1. Preview the changes
    cd blueprints/manufacturing-edge-ai-ml/main
    helm template manuela . --values ~/values-secret.yaml --debug
    

Datacenter

TIP: It is recommended to have two shells open so that you can switch between datacenter and factory clusters to run commands.

  1. Login to your cluster using oc login or exporting the KUBECONFIG

    oc login
    or

    export KUBECONFIG=~/my-ocp-env/datacenter

  2. Apply the changes to your cluster

    helm install manuela . --values ~/values-secret.yaml

  3. Check the operators have been installed

    UI -> Installed Operators

  4. Obtain the ArgoCD secret

    oc -n openshift-gitops extract secrets/openshift-gitops-cluster --to=-

  5. Obtain the Cluster ArgoCD location and log in

    oc get -n openshift-gitops routes/openshift-gitops-server

  6. Check all applications are synchronised

Having a factory (edge) cluster join the datacenter (hub)

Rather than provide instructions on creating a factory cluster it is assumed that an OpenShift cluster has already been created. Use the openshift-install program provided at cloud.redhat.com

There are a couple of ways to join the factory to the datacenter.

  • Using the ACM user interface
  • Using the clusteradm tool

Factory setup using the ACM UI

  1. From the datacenter openshift console select ACM from the top right

  1. Select the "Import cluster" option beside the highleded Create Cluster button.

  1. On the "Import an existing cluster" page, enter the cluster name and choose Kubeconfig as the "import mode". After pressiming import you will be asked to copy a command that will be used on the factory cluster.

  1. On the factory we recommend you edit a shell command file, e.g. join-cluster.sh and paste the copied command into the file and save. Then run the command by running that shell script.

    sh join-cluster.sh

This will cause the factoy to be joined with the datacenter (hub). It will also result in OpenShift GitOps to be installed on the factory cluster. This in turn will push the application components to the cluster.

Factory setup using clusteradm tool

You can also use clusteradm to join a cluster. The folloing instructions explain what needs to be done. clusteradm is still in testing.

  1. To deploy a edge cluster you will need to get the datacenter (or hub) cluster's token. You will need to install clusteradm. On the existing datacenter cluster:

    clusteradm get token

  2. When you run the clusteradm command above it replies with the token and also shows you the command to use on the factory. So first you must login to the factory cluster

    oc login or

    export KUBECONFIG=~/my-ocp-env/factory

  3. Then request to that the factory join the datacenter hub

    clusteradm join --hub-token <token from clusteradm get token command > <factory cluster name>

  4. Back on the hub cluster accept the join reguest

    clusteradm accept --clusters <factory-cluster-name>

Structure

https://docs.google.com/presentation/d/e/2PACX-1vSfbN_TbjfYnw-B6hHs-uUQ-8rRzUX27AW4eSxT7dVmBERiBgHS_FWWkgyg5fTsEWL2hj6RYyJqYi7_/pub?start=false&loop=false&delayms=3000

Uninstalling

  1. Turn off auto-sync

    helm upgrade manuela . --values ~/values-secret.yaml --set gitops.syncPolicy=Manual

  2. Remove the ArgoCD applications (except for manuela-datacenter)

    a. Browse to ArgoCD a. Go to Applications a. Click delete a. Type the application name to confirm a. Chose "Foreground" as the propagation policy a. Repeat

  3. Wait until the deletions succeed

    manuela-datacenter should be the only remaining application

  4. Complete the uninstall

    helm delete manuela

  5. Check all namespaces and operators have been removed

Diagrams

The following diagrams show the different components deployed on the datacenter and the factory.

Logical

Logical

Schematic with Networks

Schema - Networks

Schematic with Dataflows

Schema - Dataflow

Editing the diagrams.

To edit the diagrams in Draw.io you can load them here and save a local copy

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.