Giter Site home page Giter Site logo

microarch_store's Introduction

Домашнее задание https://otus.ru/lessons/microservice-architecture

Настройка окружения:

https://kubernetes.io/ru/docs/tasks/tools/install-minikube/ # minikube
https://www.virtualbox.org/wiki/Downloads # virtualbox
https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/ # minikube ingress

Домашнее задание 1:

ip=$(minikube ip) && curl -H 'Host: arch.homework' http://$ip/health
# curl -H 'Host: arch.homework' http://192.168.99.100/health

Как запустить:

kubectl apply -f ./conf/k8s/base/namespace.yaml && kubectl apply -f ./conf/k8s/base/.

Домашнее задание 2:

# Установка mysql
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install mysql -f conf/helm/mysql/values.yaml bitnami/mysql --version 8.8.12

# Запуск
kubectl apply -f ./conf/k8s/base/namespace.yaml
kubectl apply -f ./conf/k8s/base/.

Домашнее задание 3:

# Установка prometheus и nginx
minikube addons disable ingress
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update

helm install prom prometheus-community/kube-prometheus-stack -f ./conf/helm/prometheus/values.yaml --atomic
helm install nginx ingress-nginx/ingress-nginx -f ./conf/helm/ingress-nginx/values.yaml --atomic

# Запуск grafana. Перейти на http://localhost:9000(admin: prom-operator)
kubectl port-forward service/prom-grafana 9000:80

# В grafana необходимо импортировать dashboard из /data/grafana/dashboard.json

# Запуск стресс-теста
./data/test.sh
# 

Домашнее задание 5:

# Настройка окружения
kubectl apply -f ./conf/k8s/base/namespace.yaml
kubens otus
helm install prom prometheus-community/kube-prometheus-stack -f ./conf/helm/prometheus/values.yaml --atomic
helm install nginx ingress-nginx/ingress-nginx -f ./conf/helm/ingress-nginx/values.yaml --atomic
helm install mysql-auth -f conf/helm/mysql/authvalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-user -f conf/helm/mysql/uservalues.yaml bitnami/mysql --version 8.8.12

kubectl apply -f ./conf/k8s/base/.

# Запуск тестов
newman run ./data/lab-5.tests.postman_collection.json

Домашнее задание 7:

# Настройка окружения
kubectl apply -f ./conf/k8s/base/namespace.yaml
kubens otus

# app
helm install mysql-auth -f conf/helm/mysql/authvalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-user -f conf/helm/mysql/uservalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-order -f conf/helm/mysql/ordervalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-billing -f conf/helm/mysql/billingvalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-notification -f conf/helm/mysql/notificationvalues.yaml bitnami/mysql --version 8.8.12
helm install rabbitmq -f conf/helm/rabbitmq/values.yaml bitnami/rabbitmq --atomic
helm install nginx ingress-nginx/ingress-nginx -f ./conf/helm/ingress-nginx/values.yaml --atomic

# monitoring
helm install prom prometheus-community/kube-prometheus-stack -f ./conf/helm/prometheus/values.yaml --atomic

#app
kubectl apply -f ./conf/k8s/base/. --recursive

#monitoring
kubectl apply -f ./conf/k8s/monitoring/. --recursive

Итоговый проект:

# Настройка окружения
kubectl apply -f ./conf/k8s/base/namespace.yaml
kubens otus

# app
helm install mysql-auth -f conf/helm/mysql/authvalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-user -f conf/helm/mysql/uservalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-order -f conf/helm/mysql/ordervalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-billing -f conf/helm/mysql/billingvalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-notification -f conf/helm/mysql/notificationvalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-delivery -f conf/helm/mysql/deliveryvalues.yaml bitnami/mysql --version 8.8.12
helm install mysql-stock -f conf/helm/mysql/stockvalues.yaml bitnami/mysql --version 8.8.12
helm install rabbitmq -f conf/helm/rabbitmq/values.yaml bitnami/rabbitmq --atomic
helm install nginx ingress-nginx/ingress-nginx -f ./conf/helm/ingress-nginx/values.yaml --atomic

# monitoring
helm install prom prometheus-community/kube-prometheus-stack -f ./conf/helm/prometheus/values.yaml --atomic

#app
kubectl apply -f ./conf/k8s/base/. --recursive

#monitoring
kubectl apply -f ./conf/k8s/monitoring/. --recursive

microarch_store's People

Contributors

wolfrace avatar

Watchers

 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.