To delivery new document repository the following steps need to be taken:
create respective entry in metadata.
Pay proper attention to correct data and correct categories otherwise the propose job might not work for new repos
Install Tea.
sudo wget https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-amd64 -O /usr/local/bin/tea sudo chmod +x /usr/local/bin/tea
Log-In using your API-Key
tea login add
Create new repositories
python3 bootstrap_repositories.py --target-environment internal --service-type smg --work-dir ~/tmpdir8
add repository entry in zuul/main.yaml (don’t do this before step 3 otherwise see the note at the bottom page)
git clone git@github.com:opentelekomcloud-infra/zuul-config.git
Manually restart zuul node
manual zuul reload
zuul-scheduler smart-reconfigure --tenant XXX
in zuul-scheduler podkubectl --context otcci -n zuul-ci get all kubectl --context otcci -n zuul-ci exec -it pod/zuul-scheduler-0 -c zuul -- bash cat /etc/zuul-config/zuul/main.yaml | grep -i distributed zuul-scheduler smart-reconfigure zuul-scheduler --validate-tenants eco kubectl --context otcinfra -n zuul-ci logs -f pod/zuul-scheduler-main-0 zuul-scheduler
Alternatively you can restart zuul-scheduler first and wait till newer pods run and after that restart also zuul-web you can do it by kubectl:
kubectl rollout restart deploy zuul-scheduler kubectl rollout restart deploy zuul-web
or by argo-cd web-ui
update gitstyring
git clone git@gitea.eco.tsi-dev.otc-service.com:2222/infra/gitstyring.git python3 ~/otc-metadata/tools/generate_doc_gitcontrol_repos.py --target-environment internal --work-dir gitstyring/data/gitea/orgs/docs/repositories/ cd gitstyring//data/gitea/orgs/docs/repositories git checkout -b add_new_repos git add cloud-container-instance.yml distributed-database-middleware.yml
Update zuul.yaml (optional)
python3 ~/otc-metadata/tools/update_zuul_project_configs.py --environment internal --service-type smg --work-dir workspace/github/opentelekomcloud-infra/gitstyring/data/data/github/orgs/opentelekomcloud-docs/repositories
Update manually zuul.yaml on doc-exports repository to enable check jobs for newly added repos
Generate updated metadata.yaml in the doc-exports repository with tools/generate_docexports_data.py:
python tools/generate_docexports_data.py > ../../docs/doc-exports/metadata.yaml
Consequentially create PR with changed content in doc-exports repo
Update conf.py and tox.ini in target repository:
python3 ~/otc-metadata/tools/generate_doc_confpy.py --update-tox --service-type er --target-environment internal --work-dir ~/test92 --update-sbv --overwrite-index-sbv --update-zuul
It will create confpy branch in targe repository. For successful check jobs make sure that in target doc directories the _static folder with .placeholder file is created
NOTE:
In case that no zuul job is started especially in case that initial repo was created without any content Zuul is not aware of the further changes as it stores in zuul scheduler that there are no jobs at all. Check in zuul projects you open the project (under projects). And if it does NOT contain any jobs you need to do “zuul-scheduler tenant-reconfigure gl” on bridge -> zuul-scheduler