init report && move live_monitor_vue

This commit is contained in:
2024-03-22 13:27:00 +03:00
parent b215f88b2c
commit 4e123e6555
255 changed files with 79351 additions and 0 deletions

View File

@@ -0,0 +1,108 @@
# Пакетный репозиторий
## Основные приниципы
* Репозиторий предлагает работу с пакетами как с конструктором.
* Пакеты разделены на уровни в соотвествии с уровнем их абстракции. Цифра в начале названия пакета указывает на уровень абстракции. 0 - самый высокий уровень, 9 - самый низкий.
* Пакет с высоким уровнем абстракции может использоваться ТОЛЬКО в пакетах с более низким уровнем абстракции. ![схема](./images/Схема.jpg)
# Установщики и пакеты
## Установка Docker
* sudo apt install apt-transport-https ca-certificates curl software-properties-common
* curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
* sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
* apt-cache policy docker-ce
* sudo apt install docker-ce
* sudo systemctl status docker
## Установка verdaccio
#### *требуются дополнительные настройки*
### Скачиваем образ
* docker pull verdaccio/verdaccio
### Запуск под docker volume
* docker volume create --name verdaccio-storage
* docker run -d --name verdaccio -p 4873:4873 --restart unless-stopped -v verdaccio-storage:/verdaccio verdaccio/verdaccio
### Volume в локальной папке
* mkdir verdaccio
* mkdir verdaccio/storage
* sudo chmod a+rwx ./verdaccio
* sudo chmod a+rwx ./verdaccio/storage
* docker run -d --name verdaccio -p 4873:4873 --restart unless-stopped -v /data/verdaccio/storage:/verdaccio/storage verdaccio/verdaccio
## Работа с npm
### Создать пользователя и зарегестрироваться
* npm adduser --registry https://vniac.ru:4873/
* Пример login: vbuglov, password: *****, email: test@test.tets
### Переключение регестри.
#### Будет работать только npm; yarn не чувствует авторизацтию
* npm set registry https://vniac.ru:4873/
* yarn config set registry https://vniac.ru:4873/ (обычно не требуется)
#### Вернуть регистри назад
* npm set registry https://registry.npmjs.org/
#### Установки из регистри
* npm install 5-test-package --registry=https://vniac.ru:4873/
## Создание npm auth token
* npm login --registry https://vniac.ru:4873/
* npm token list --registry https://vniac.ru:4873/
* npm token create --registry https://vniac.ru:4873/
## Публикация пакета
* npm config set registry http://$NPM_REGISTRY
* npm config set //$NPM_REGISTRY:_authToken=$NPM_TOKEN *(для работы из гита)*
* npm publish --tag latest
## Публикация пакета из гитлаба
* npm config set registry https://vniac.ru:4873/
* npm config set https://vniac.ru:4873:_authToken=d16uS0wqLkS97/E98V2pgtL3EY3C+0aThqUkrzIIhI4=
* npm publish --tag latest
## Установка пакета из репозитория
* npm install 1-toolkits-helpers --registry=https://vniac.ru:4873/
## History 1
* docker login cr.selcloud.ru
* docker login -u token -p CRgAAAAAsYBrOCPNnU4w5lpyWvBUqBJZc10Zx2Vk cr.selcloud.ru/test
* docker pull cr.selcloud.ru/test/serverx:v0.0.1
* ls
* docker images
* docker run ca9acef541e4
* docker run -p 8080:80 ca9acef541e4
* history
* exit
* ssh-keygen -t rsa
* ssh-copy-id root@31.41.155.24
* ssh 'root@31.41.155.24'
* cat .ssh/id_rsa
* history
## History 2
* 1 exit
* 2 sudo apt install apt-transport-https ca-certificates curl software-properties-common
* 3 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
* 4 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
* 5 apt-cache policy docker-ce
* 6 sudo apt install docker-ce
* 7 sudo systemctl status docker
* 8 docker ps
* 9 docker login cr.selcloud.ru
* 10 docker login -u token -p CRgAAAAAh1ym3ZjMpOFRRiZUeVgVRTDWe2a-Xjaa cr.selcloud.ru/learn-registry
* 11 docker pull cr.selcloud.ru/learn-registry/learnbuild:v0.0.1
* 12 ls
* 13 docker images
* 14 docker run -d -p 4040:80 --rm --name cr.selcloud.ru/learn-registry/learnbuild cr.selcloud.ru/learn-registry/learnbuild
* 15 docker run -d -p 4040:80 --rm 8e7dfb4cfe29
* 16 $ ssh-keygen -t rsa
* 17 ssh-keygen -t rsa
* 18 ls
* 19 ls .ssh/
* 20 cd .ssh/id_rsa
* 21 cat .ssh/id_rsa
* 22 ssh root@185.91.52.59
* 23 docker ps
* 24 docker stop ff9cb826bbec
* 25 docker ps
* 26 cat .ssh/id_rsa
* 27 history

View File

@@ -0,0 +1,57 @@
# This file is a template, and might need editing before it works on your project.
# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
#
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should no`t add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
#
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
image: "node:20-slim" #дефолтный если не указан в стейдже
stages: # List of stages for jobs, and their order of execution
# - build
- test
- deploy-and-build
# build-job: # This job runs in the build stage, which runs first.
# stage: build
# script:
# - echo "Compiling the code..."
# - echo "Compile complete."
unit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
image: "node:18-slim"
script:
- 'npm install'
- 'npm run test'
# lint-test-job: # This job also runs in the test stage.
# stage: test # It can run at the same time as unit-test-job (in parallel).
# script:
# - echo "Linting code... This will take about 10 seconds."
# - sleep 10
# - echo "No lint issues found."
deploy-job: # This job runs in the deploy stage.
stage: deploy-and-build # It only runs when *both* jobs in the test stage complete successfully.
environment: production
image: "node:18-slim"
script:
- 'npm install'
- './node_modules/.bin/babel src --out-dir dist'
- 'npm config set registry http://$NPM_REGISTRY'
- 'npm config set //$NPM_REGISTRY:_authToken=$NPM_TOKEN'
- 'npm publish --tag latest'

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB