Problem/ context :
I would like to create snapshot of rpm but also deb repositories
I have create differents reposiroties for each OS to distribute packages on the company.
Now we take an example with pulp-deb for ubuntu repos.
I would like to generate each 3 months a snapshot of a distribution to be able all ubuntu servers with the same versions of patchs
I have generated a script to do create repos
POETRYRUN='poetry run'
REPOID='ext-ubuntu_bionic-dockerce_amd64'
echo "# Create repository for ${REPOID} #"
$POETRYRUN pulp deb repository create --name=${REPOID} | jq -C
echo "# Create remote with all the necessary params for ${REPOID} #"
$POETRYRUN pulp deb remote create --name ${REPOID} ${PARAM_REMOTE_L[${ind}]} ${DEFAULT_REMOTE_OPTIONS[@]} | jq -C
echo "# Sync the remote with the repo for ${REPOID} #"
$POETRYRUN pulp deb repository sync --name ${REPOID} --remote ${REPOID} --mirror | jq -C
echo "# Create metadatas for ${REPOID} #"
$POETRYRUN pulp deb publication --type apt create --repository "${REPOID}" | jq -C
echo "# Publish on the website for ${REPOID} #"
$POETRYRUN pulp deb distribution create --name "${REPOID}" --base-path "${REPOID}" --repository "${REPOID}" | jq -C
Now I would like to know how to generate my snapshot ?
If I have well understood, I have to create a new publication base on the same repository and create a new distribution based on this publication.
I execute that commands :
$POETRYRUN pulp deb publication --type apt create --repository "${REPOID}"
# I get the pulp_href in the output
$POETRYRUN pulp deb distribution create --name "${REPOID}_Snap" --base-path "${REPOID}_Snap" --publication "/pulp/api/v3/publications/deb/apt/018fa564-1dad-7759-a8b2-2
1ba27026329/"
Is it the good way to generate this snapshot. The goal is to have no change in this new snapshot because I will do every 3 days an update od the main repo:
# Update every 3 days of the main repo ( and keep the snapshot as initial )
echo "# Sync the remote with the repo for ${REPOID} #"
$POETRYRUN pulp deb repository sync --name ${REPOID} --remote ${REPOID}
echo "# Create metadatas for ${REPOID} #"
$POETRYRUN pulp deb publication create --repository "${REPOID}"
Pulpcore + plugin version:
“deb”: “3.2.0”,
“rpm”: “3.25.2”,
“core”: “3.50.2”
Operating system - distribution and version:
k8s
I have read to documentation ( Promotion — Pulp Project 3.54.0 documentation ) but I would like to be sure because I don’t find examples to follow.
Thanks in advance