Valentin Lab
93542f2f2b
|
6 years ago | |
---|---|---|
odoo | 4 years ago | |
.copier-answers.yml | 4 years ago | |
.drone.yml | 4 years ago | |
.editorconfig | 4 years ago | |
.eslintrc.yml | 4 years ago | |
.flake8 | 4 years ago | |
.gitignore | 4 years ago | |
.isort.cfg | 4 years ago | |
.pre-commit-config.yaml | 4 years ago | |
.prettierrc.yml | 4 years ago | |
.pylintrc | 4 years ago | |
.pylintrc-mandatory | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
common.yaml | 4 years ago | |
devel.yaml | 4 years ago | |
prod.yaml | 4 years ago | |
setup-devel.yaml | 4 years ago | |
tasks.py | 4 years ago | |
test.yaml | 4 years ago |
README.md
Myceliandre freezing
There are a number of floating target that needs to be replaced to ensure as much as possible a rebuildable fixed target image.
How do we freeze
The fixing process will be conducted by an external script that will go through all moving targets to replace them with a fixed version.
The fixing process could have involved running a docker build, and using the resulting
image to fix and freeze things by modifying files in odoo_base
.
But, because some cleaning processes (removing of .git
dir) are conducted, we choose
to do part of it before (inspecting git sources, and fixing repos.yaml
before hand).
Other part of this process still are more simply done on the resulting image built by
pip
or apt
because the full version dep graph is more easily queryiable on a
resulting installation that buildable by inference.
What is freezed
This modify files everywhere and this will be pushed as a commit automatically with a
tag -. The corresponding image should be easily found in
docker.0k.io
repository with same tag.
When possible, the version will also be saved locally.
original docker base
Check if FROM
is local (from docker.0k.io), otherwise we need to tag it and push it to
docker.0k.io
.
tecnativa/doodba:12.0-onbuild
once caught, execute a docker pull MOVING_REF
, then tag and push on docker.0k.io,
modify file in odoodba
full git-aggregators
track any refs that are branches. If repository has a branch, is not cloned in gittea, then clone it, create tag with current global tag (-), replace source URL, target in yaml file by tag. Keep in comments the actual original source and original targets.
Needs to be checked on the checked image, on the repositories.
Pip package
A pip freeze
need to be run to get all versions, and for easy diff, output a file that
would be:
package1==version
...
## Unspecified deps
packageA==version
apt packages
Same here
## gives all packages installed and their version
dpkg-query -l | grep ^ii | awk '{print $2 "\t" $3}'
We need to produce a meaningfull report of differences between versions
The best would be to be able to use git diff
.
Additional possibility for committing a new release
we could flatten git history, and docker resulting incremental image (diffing exports of docker files).
Process
freezing a completely new version
bin/freeze
That will be run on gitea automatically and pushed as a tagged version.
But this is also doable from the dev computer.
Making modification
git co master # (unfreezed version)
OR git clone -b BRANCH release/candidate/YYYMMDD-HHMMSS
Make modif, commit. Gitea will automatically create a new:
- release/candidate/YYYMMDD-HHMMSS branch
Checking possible updates (optional)
Identify locked entries, and go fetch update, allow to update.
Updating
Ask to update one of the links
Troubleshooting
docker run -ti \
--env PLUGIN_SSH_KNOWN_HOSTS="$(ssh-keyscan -H -p 10022 git.0k.io 2>/dev/null)" \
--env PLUGIN_SSH_PRIVATE_KEY="$(cat ~/.ssh/ssh_myceliandre_mirror)" \
--env PLUGIN_DOCKER_CONFIG_JSON='{"auths": {"docker.0k.io": {"auth": "bWlycm9yOkh1bnZNSlpJMW9ra3VoSWs="}}}' \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/vaab/dev/docker/odoo_base:/tmp/odoo_base \
-w /tmp/odoo_base \
-v /home/vaab/dev/sh/0k-docker/src/bin/dupd:/usr/local/bin/dupd \
docker.0k.io/0k-mirror-freezer /bin/bash