Giter Club home page Giter Club logo

industrial-edge's Introduction

Start Here

If you've followed a link to this repo, but are not really sure what it contains or how to use it, head over to http://hybrid-cloud-patterns.io/industrial-edge/ for additional context before continuing.

Prerequisites

  1. An OpenShift cluster ( Go to https://console.redhat.com/openshift/create )
  2. (Optional) A second OpenShift cluster
  3. A github account (and a token for it with repos permissions, to read from and write to your forks)
  4. A quay account with the following repos set as public:
  • http-ionic
  • httpd-ionic
  • iot-anomaly-detection
  • iot-consumer
  • iot-frontend
  • iot-software-sensor
  1. The helm binary, see https://helm.sh/docs/intro/install/

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 deploy

  1. Fork the manuela-dev repo on GitHub. It is necessary to fork this repo because the GitOps framework will push tags to this repo that match the versions of software that it will deploy.

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

  3. Clone the forked copy of this repo.

    git clone --recurse-submodules [email protected]:your-username/industrial-edge.git
    
  4. 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 values-secret.yaml.template ~/values-secret.yaml
vi ~/values-secret.yaml
  1. Customize the deployment for your cluster

    vi values-global.yaml
    git add values-global.yaml
    git commit values-global.yaml
    git push
    
  2. Preview the changes

    make show
    
  3. Login to your cluster using oc login or exporting the KUBECONFIG

    oc login
    

    or

    export KUBECONFIG=~/my-ocp-env/datacenter
    
  4. Apply the changes to your cluster

    make install
    
  5. Check the operators have been installed

    UI -> Installed Operators
    
  6. Obtain the ArgoCD urls and passwords

    The URLs and login credentials for ArgoCD change depending on the pattern name and the site names they control. Follow the instructions below to find them, however you choose to deploy the pattern.

    Display the fully qualified domain names, and matching login credentials, for all ArgoCD instances:

    ARGO_CMD=`oc get secrets -A -o jsonpath='{range .items[*]}{"oc get -n "}{.metadata.namespace}{" routes; oc -n "}{.metadata.namespace}{" extract secrets/"}{.metadata.name}{" --to=-\\n"}{end}' | grep gitops-cluster`
    eval $ARGO_CMD
    

    The result should look something like:

    NAME                       HOST/PORT                                                                                         PATH      SERVICES                   PORT    TERMINATION            WILDCARD
    datacenter-gitops-server   datacenter-gitops-server-industrial-edge-datacenter.apps.mycluster.mydomain.com          datacenter-gitops-server   https   passthrough/Redirect   None
    # admin.password
    2F6kgITU3DsparWyC
    
    NAME                    HOST/PORT                                                                                   PATH   SERVICES                PORT    TERMINATION            WILDCARD
    factory-gitops-server   factory-gitops-server-industrial-edge-factory.apps.mycluster.mydomain.com          factory-gitops-server   https   passthrough/Redirect   None
    # admin.password
    K4ctDIm3fH7ldhs8p
    
    NAME                      HOST/PORT                                                                              PATH   SERVICES                  PORT    TERMINATION            WILDCARD
    cluster                   cluster-openshift-gitops.apps.mycluster.mydomain.com                          cluster                   8080    reencrypt/Allow        None
    kam                       kam-openshift-gitops.apps.mycluster.mydomain.com                              kam                       8443    passthrough/None       None
    openshift-gitops-server   openshift-gitops-server-openshift-gitops.apps.mycluster.mydomain.com          openshift-gitops-server   https   passthrough/Redirect   None
    # admin.password
    WNklRCD8EFg2zK034
    
  7. Check all applications are synchronised

Deploying the factory applications

Once the data center has been setup correctly and confirmed to be working, it is time to attach one or more factories to the architecture (see diagrams below).

For instructions on deploying the factory please read the following document.

Pattern Layout and Structure

https://slides.com/beekhof/hybrid-cloud-patterns

Uninstalling

Probably wont work

  1. Turn off auto-sync

    helm upgrade manuela . --values ~/values-secret.yaml --set global.options.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

More reading

General Hybrid Cloud Patterns reading

For more general patterns documentation please refer to the hybrid cloud patterns docs here.

Industrial Edge application demos

Once the data center and the factory have been deployed you will want to check out and test the Industrial Edge 2.0 demo code. You can find that here

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

industrial-edge's People

Contributors

beekhof avatar wrichter avatar mhjacks avatar oglok avatar stefan-bergstein avatar claudiol avatar ipbabble avatar danielfroehlich avatar lavlas avatar ortwinschneider 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.