TYsewyn / Getting-Started-with-Spring-Cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting started with Spring Cloud

Workshop Materials: https://github.com/TYsewyn/Getting-started-with-Spring-Cloud

Tim Ysewyn, Solutions Architect, VMware

What You Will Do

  • Define a contract between two applications
  • Create a basic Spring Boot application
  • Deploy and run the application on Kubernetes
  • Configure an API gateway
  • Make your application more resilient

Prerequisites

Everyone will need:

  • Basic knowledge of Spring and Kubernetes (we will not be giving an introduction to either)

If you are following these notes from an event, all the pre-requisites will be provided in the Lab. You only need to worry about these if you are going to work through the lab on your own.

Doing the Workshop on Your Own

  • If you are doing this workshop on your own, you will need to have your own Kubernetes cluster and Docker repo that the cluster can access:
    • Docker Desktop and Docker Hub - Docker Desktop lets you easily setup a local Kubernetes cluster (Mac, Windows). This, in combination with Docker Hub, should let you run through this workshop.
    • Hosted Kubernetes Clusters and Repos - Various cloud providers, such as Google and Amazon, offer options for running Kubernetes clusters and repositories in the cloud. You will need to follow instructions from the cloud provider to provision the cluster and repository as well as for configuring kubectl to work with the cluster.

Doing The Workshop in Strigo

  1. Login To Strigo.

  2. Configure git. Run this command in the terminal:

$ git config --global user.name "<name>"
$ git config --global user.email "<email>"
  1. To configure kubectl, run the following command in the terminal:
$ kind-setup
Cluster already active: kind
Setting up kubeconfig
  1. Verify kubectl is configured correctly
$ kubectl cluster-info
Kubernetes master is running at https://127.0.0.1:43723
KubeDNS is running at https://127.0.0.1:43723/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

NOTE: It might take a minute or so after the VM launches to get the Kubernetes API server up and running, so your first few attempts at using kubectl may be very slow or fail. After that it should be responsive.

  1. Install tree
$ nix-env -i tree

Setting up the environment

  1. Installing Kubernetes Operator Lifecycle Manager

    curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.15.1/install.sh | bash -s 0.15.1

     NOTE: Check [the OLM releases](https://github.com/operator-framework/operator-lifecycle-manager/releases) to install the latest version.
    
  2. Redis Operator (assuming your K8s cluster has internet access)

    kubectl create -f https://raw.githubusercontent.com/TYsewyn/Getting-started-with-Spring-Cloud/master/redis-operator.yaml

  3. Redis

    kubectl create -f https://raw.githubusercontent.com/TYsewyn/Getting-started-with-Spring-Cloud/master/redis.yaml

Table of Workshop Contents

About


Languages

Language:Shell 100.0%