https://github.com/sonikq/architecture-sprint-3
Splitting a monolith into microservices for a smart home system. Creation of ER diagrams. Creating and documenting an API.
https://github.com/sonikq/architecture-sprint-3
api-gateway c4-model charts kafka kubernetes microservices system-design
Last synced: about 1 month ago
JSON representation
Splitting a monolith into microservices for a smart home system. Creation of ER diagrams. Creating and documenting an API.
- Host: GitHub
- URL: https://github.com/sonikq/architecture-sprint-3
- Owner: sonikq
- Created: 2025-01-19T16:26:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-05T15:23:37.000Z (over 1 year ago)
- Last Synced: 2025-06-10T08:04:59.347Z (about 1 year ago)
- Topics: api-gateway, c4-model, charts, kafka, kubernetes, microservices, system-design
- Language: Java
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Базовая настройка
## Выполненные задания спринта находятся в файле: 'Project_template_part_1'.
## Запуск minikube
[Инструкция по установке](https://minikube.sigs.k8s.io/docs/start/)
```bash
minikube start
```
## Добавление токена авторизации GitHub
[Получение токена](https://github.com/settings/tokens/new)
```bash
kubectl create secret docker-registry ghcr --docker-server=https://ghcr.io --docker-username= --docker-password= -n default
```
## Установка API GW kusk
[Install Kusk CLI](https://docs.kusk.io/getting-started/install-kusk-cli)
```bash
kusk cluster install
```
## Смена адреса образа в helm chart
После того как вы сделали форк репозитория и у вас в репозитории отработал GitHub Action. Вам нужно получить адрес образа /architecture-sprint-3/pkgs/container/architecture-sprint-3
Он выглядит таким образом
```ghcr.io//architecture-sprint-3:latest```
Замените адрес образа в файле `helm/smart-home-monolith/values.yaml` на полученный файл:
```yaml
image:
repository: ghcr.io//architecture-sprint-3
tag: latest
```
## Настройка terraform
[Установите Terraform](https://yandex.cloud/ru/docs/tutorials/infrastructure-management/terraform-quickstart#install-terraform)
Создайте файл ~/.terraformrc
```hcl
provider_installation {
network_mirror {
url = "https://terraform-mirror.yandexcloud.net/"
include = ["registry.terraform.io/*/*"]
}
direct {
exclude = ["registry.terraform.io/*/*"]
}
}
```
## Применяем terraform конфигурацию
```bash
cd terraform
terraform init
terraform apply
```
## Настройка API GW
```bash
kusk deploy -i api.yaml
```
## Проверяем работоспособность
```bash
kubectl port-forward svc/kusk-gateway-envoy-fleet -n kusk-system 8080:80
curl localhost:8080/hello
```
## Delete minikube
```bash
minikube delete
```