From 32def5932656000078a90f72359aafe7361aaf03 Mon Sep 17 00:00:00 2001 From: Konstantin Nezhbert Date: Mon, 11 Oct 2021 14:07:55 +0300 Subject: [PATCH 1/3] Fix the installation pages --- .../_includes/en/installation/trdl_macos.md | 17 +++++++++++------ .../_includes/ru/installation/trdl_macos.md | 19 ++++++++++++------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/docs/site/_includes/en/installation/trdl_macos.md b/docs/site/_includes/en/installation/trdl_macos.md index 59f5831317..183df953bd 100644 --- a/docs/site/_includes/en/installation/trdl_macos.md +++ b/docs/site/_includes/en/installation/trdl_macos.md @@ -1,6 +1,7 @@ -Make sure you have Git 2.18.0 or newer and [Docker](https://docs.docker.com/get-docker) installed. +Make sure you have [Git](https://git-scm.com/download/mac) 2.18.0 or newer and [Docker](https://docs.docker.com/get-docker) installed. Setup [trdl](https://github.com/werf/trdl) which will manage `werf` installation and updates: + ```shell # Add ~/bin to the PATH. echo 'export PATH=$HOME/bin:$PATH' >> ~/.zprofile @@ -17,17 +18,21 @@ Add `werf` repo: trdl add werf https://tuf.werf.io 1 b7ff6bcbe598e072a86d595a3621924c8612c7e6dc6a82e919abe89707d7e3f468e616b5635630680dd1e98fc362ae5051728406700e6274c5ed1ad92bea52a2 ``` -For local usage we recommend automatically activating `werf` for new shell sessions: +To use werf locally in your terminal, we recommend to enable its automatic activation. To make werf available in all new shell sessions, you need to execute this command (just once): ```shell echo 'source $(trdl use werf {{ include.version }} {{ include.channel }})' >> ~/.zshrc ``` -But in CI you should prefer activating `werf` explicitly in the beginning of each job/pipeline: +Now, if you log out and log in to the system again, werf will be always available. You can make sure of that by executing: + ```shell -source $(trdl use werf {{ include.version }} {{ include.channel }}) +werf version ``` -Make sure that `werf` is available now (open new shell if you chose automatic activation): +To get werf running in your current terminal only (before any logout/login is done), you can simply execute the `source $(trdl use werf {{ include.version }} {{ include.channel }})` command. + +In CI, you need a different approaching with activating `werf` explicitly in the beginning of each job/pipeline by executing: + ```shell -werf version +source $(trdl use werf {{ include.version }} {{ include.channel }}) ``` diff --git a/docs/site/_includes/ru/installation/trdl_macos.md b/docs/site/_includes/ru/installation/trdl_macos.md index 38bf214de4..8f854e1310 100644 --- a/docs/site/_includes/ru/installation/trdl_macos.md +++ b/docs/site/_includes/ru/installation/trdl_macos.md @@ -1,6 +1,7 @@ -Убедитесь, что Git версии 2.18.0 или новее и [Docker](https://docs.docker.com/get-docker) установлены. +Убедитесь, что [Git](https://git-scm.com/download/mac) версии 2.18.0 или новее и [Docker](https://docs.docker.com/get-docker) установлены. Установите [trdl](https://github.com/werf/trdl), который будет отвечать за установку и обновление `werf`: + ```shell # Добавьте ~/bin в PATH. echo 'export PATH=$HOME/bin:$PATH' >> ~/.zprofile @@ -12,22 +13,26 @@ mkdir -p ~/bin install /tmp/trdl ~/bin/trdl ``` -Добавьте `werf` репозиторий: +Добавьте репозиторий с `werf`: ```shell trdl add werf https://tuf.werf.io 1 b7ff6bcbe598e072a86d595a3621924c8612c7e6dc6a82e919abe89707d7e3f468e616b5635630680dd1e98fc362ae5051728406700e6274c5ed1ad92bea52a2 ``` -Для локальной разработки рекомендуем настроить автоматическую активацию `werf` для новых shell-сессий: +Для локального использования werf (в терминале) мы рекомендуем настроить автоматическую активацию утилиты. Чтобы werf была доступна во всех новых shell-сессиях, выполните следующую команду (это потребуется сделать лишь один раз): ```shell echo 'source $(trdl use werf {{ include.version }} {{ include.channel }})' >> ~/.zshrc ``` -А в CI рекомендуем активировать `werf` явно в начале каждого job/pipeline: +Теперь, если вы выйдете из системы и залогинитесь в неё обратно, werf всегда будет доступна. Убедиться в этом можно следующей командой: + ```shell -source $(trdl use werf {{ include.version }} {{ include.channel }}) +werf version ``` -Убедитесь, что `werf` теперь доступен в командной строке (начните новую shell-сессию, если вы предпочли автоматическую активацию): +Чтобы получить werf только в текущем терминале (до того, как перезашли в систему), достаточно выполнить команду `source $(trdl use werf {{ include.version }} {{ include.channel }})`. + +Для CI рекомендуется другой подход с явной активацией `werf` в начале каждого job/pipeline. Она выполняется командой: + ```shell -werf version +source $(trdl use werf {{ include.version }} {{ include.channel }}) ``` From c04e5d3ef085f8546af2b3a0f0dedc7acd83f499 Mon Sep 17 00:00:00 2001 From: Konstantin Nezhbert Date: Mon, 11 Oct 2021 14:24:03 +0300 Subject: [PATCH 2/3] Fix the Quickstart pages in the mac os version --- docs/documentation/pages_en/quickstart.md | 23 ++++++++++++++++------- docs/documentation/pages_ru/quickstart.md | 23 ++++++++++++++++------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/docs/documentation/pages_en/quickstart.md b/docs/documentation/pages_en/quickstart.md index f2b1b04020..492db1d9f0 100644 --- a/docs/documentation/pages_en/quickstart.md +++ b/docs/documentation/pages_en/quickstart.md @@ -154,7 +154,8 @@ Or use one of the following instructions to set up the local Kubernetes cluster MacOS — minikube
1. Install [minikube](https://github.com/kubernetes/minikube#installation). -2. Start minikube: +2. Install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/). +3. Start minikube: {% raw %} ```shell @@ -164,7 +165,7 @@ Or use one of the following instructions to set up the local Kubernetes cluster **IMPORTANT** Param `--insecure-registry` allows usage of Container Registry without TLS. TLS in our case dropped for simplicity. -3. Install NGINX Ingress Controller: +4. Install NGINX Ingress Controller: {% raw %} ```shell @@ -172,7 +173,7 @@ Or use one of the following instructions to set up the local Kubernetes cluster ``` {% endraw %} -4. Install Container Registry to store images: +5. Install Container Registry to store images: {% raw %} ```shell @@ -209,7 +210,7 @@ Or use one of the following instructions to set up the local Kubernetes cluster ``` {% endraw %} -5. Allow usage of Container Registry without TLS for docker: +6. Allow usage of Container Registry without TLS for docker: Using menu Docker Desktop -> Settings -> Docker Engine add following configuration key: @@ -221,7 +222,15 @@ Or use one of the following instructions to set up the local Kubernetes cluster Restart Docker Desktop using right button menu of the tray Docker Desktop icon. -6. Allow usage of Container Registry without TLS for werf: + Then start minikube again: + + {% raw %} + ```shell + minikube start --driver=docker --insecure-registry registry.example.com:80 + ``` + {% endraw %} + +7. Allow usage of Container Registry without TLS for werf: Set `WERF_INSECURE_REGISTRY=1` environment variable in the terminal where werf would run. For bash: @@ -235,7 +244,7 @@ Or use one of the following instructions to set up the local Kubernetes cluster echo export WERF_INSECURE_REGISTRY=1 | tee -a ~/.bashrc ``` -7. We are going to use `vote.quickstart-application.example.com` and `result.quickstart-application.example.com` domains to access application and `registry.example.com` domain to access Container Registry. +8. We are going to use `vote.quickstart-application.example.com` and `result.quickstart-application.example.com` domains to access application and `registry.example.com` domain to access Container Registry. Let's update hosts file. Run the following command in the terminal: @@ -243,7 +252,7 @@ Or use one of the following instructions to set up the local Kubernetes cluster echo "$(minikube ip) vote.quickstart-application.example.com result.quickstart-application.example.com registry.example.com" | sudo tee -a /etc/hosts ``` -8. Let's also add `registry.example.com` domain to the minikube node: +9. Let's also add `registry.example.com` domain to the minikube node: ```shell minikube ssh -- "echo $(minikube ip) registry.example.com | sudo tee -a /etc/hosts" diff --git a/docs/documentation/pages_ru/quickstart.md b/docs/documentation/pages_ru/quickstart.md index c65bccc2ad..82b69230ce 100644 --- a/docs/documentation/pages_ru/quickstart.md +++ b/docs/documentation/pages_ru/quickstart.md @@ -157,7 +157,8 @@ werf version MacOS — minikube
1. Установите [minikube](https://github.com/kubernetes/minikube#installation). -2. Запустите minikube: +2. Установите [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/). +3. Запустите minikube: {% raw %} ```shell @@ -167,7 +168,7 @@ werf version **ВАЖНО.** С параметром `--insecure-registry` мы подготавливаем такое окружение, которое сможет работать с Container Registry без TLS. В нашем случае для упрощения настройка TLS отсутствует. -3. Установка NGINX Ingress Controller: +4. Установка NGINX Ingress Controller: {% raw %} ```shell @@ -175,7 +176,7 @@ werf version ``` {% endraw %} -4. Установка Container Registry для хранения образов: +5. Установка Container Registry для хранения образов: {% raw %} ```shell @@ -212,7 +213,7 @@ werf version ``` {% endraw %} -5. Разрешаем доступ в Container Registry без TLS для docker: +6. Разрешаем доступ в Container Registry без TLS для docker: Через меню Docker Desktop -> Settings -> Docker Engine добавим новый ключ в конфигурацию: @@ -224,7 +225,15 @@ werf version Перезапустим Docker Desktop через меню, открывающееся правым кликом по иконке Docker Desktop в трее. -6. Разрешаем доступ в Container Registry без TLS для werf: + Затем снова запустим minikube: + + {% raw %} + ```shell + minikube start --driver=docker --insecure-registry registry.example.com:80 + ``` + {% endraw %} + +7. Разрешаем доступ в Container Registry без TLS для werf: В терминале где будет запускаться werf установим переменную окружения `WERF_INSECURE_REGISTRY=1`. Для bash: @@ -238,7 +247,7 @@ werf version echo export WERF_INSECURE_REGISTRY=1 | tee -a ~/.bashrc ``` -7. Мы будем использовать домены `vote.quickstart-application.example.com` и `result.quickstart-application.example.com` для доступа к приложению и домен `registry.example.com` для доступа к Container Registry. +8. Мы будем использовать домены `vote.quickstart-application.example.com` и `result.quickstart-application.example.com` для доступа к приложению и домен `registry.example.com` для доступа к Container Registry. Обновим файл hosts. Выполните команду в терминале: @@ -246,7 +255,7 @@ werf version echo "$(minikube ip) vote.quickstart-application.example.com result.quickstart-application.example.com registry.example.com" | sudo tee -a /etc/hosts ``` -8. Также делаем доступ к домену `registry.example.com` из minikube node: +9. Также делаем доступ к домену `registry.example.com` из minikube node: ```shell minikube ssh -- "echo $(minikube ip) registry.example.com | sudo tee -a /etc/hosts" From b8f8a892635d70ad3a633b041402e4847e4ccac4 Mon Sep 17 00:00:00 2001 From: Konstantin Nezhbert Date: Mon, 11 Oct 2021 14:30:54 +0300 Subject: [PATCH 3/3] Small fix quickstart --- docs/documentation/pages_en/quickstart.md | 2 +- docs/documentation/pages_ru/quickstart.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/documentation/pages_en/quickstart.md b/docs/documentation/pages_en/quickstart.md index 492db1d9f0..edce6014d0 100644 --- a/docs/documentation/pages_en/quickstart.md +++ b/docs/documentation/pages_en/quickstart.md @@ -226,7 +226,7 @@ Or use one of the following instructions to set up the local Kubernetes cluster {% raw %} ```shell - minikube start --driver=docker --insecure-registry registry.example.com:80 + minikube start --vm=true --insecure-registry registry.example.com:80 ``` {% endraw %} diff --git a/docs/documentation/pages_ru/quickstart.md b/docs/documentation/pages_ru/quickstart.md index 82b69230ce..2b28889b2e 100644 --- a/docs/documentation/pages_ru/quickstart.md +++ b/docs/documentation/pages_ru/quickstart.md @@ -229,7 +229,7 @@ werf version {% raw %} ```shell - minikube start --driver=docker --insecure-registry registry.example.com:80 + minikube start --vm=true --insecure-registry registry.example.com:80 ``` {% endraw %}