[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
The proposal to merge ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461806 -- Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
Review: Approve -- https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461806 Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
Ines Almeida has proposed merging ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master. Commit message: lp-fetch-service: add num_units to bundle Requested reviews: Canonical Launchpad Engineering (launchpad) For more details, see: https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461806 This was missing from the last MP. Without this, there are no units initiated -- Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. diff --git a/lp-fetch-service/bundle.yaml b/lp-fetch-service/bundle.yaml index e23fe8a..f61625e 100644 --- a/lp-fetch-service/bundle.yaml +++ b/lp-fetch-service/bundle.yaml @@ -19,4 +19,5 @@ applications: charm: "./fetch-service_ubuntu-22.04-amd64.charm" resources: snap: "./fetch-service.snap" +num_units: 1 {%- endif %} ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
The proposal to merge ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461232 -- Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
I'll go ahead and merge this MP, having in mind that it might still require some changes to get it to the place we need it to be. Such changes can be handled in follow-up MPs. -- https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461232 Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
Review: Approve -- https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461232 Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
The proposal to merge ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master has been updated. Commit message changed to: lp-fetch-service: Add barebones of lp-fetch-service mojo spec While the charm and snap are not public, they require manually building, and deploying from the local charm For more details, see: https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461232 -- Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
Thank you for the review! Comments were addressed. I also updated the commit message to mention the service to be consistent with other commit messages in this repo. Diff comments: > diff --git a/lp-fetch-service/README.md b/lp-fetch-service/README.md > new file mode 100644 > index 000..65e09cb > --- /dev/null > +++ b/lp-fetch-service/README.md > @@ -0,0 +1,21 @@ > +# Launchpad fetch service > + > +This spec deploys Launchpad's fetch service. > + > +You can run it locally using Juju's LXD support and Mojo. First, configure > +your environment: > + > +export MOJO_ROOT="$HOME/.local/share/mojo" > +export MOJO_PROJECT=mojo-lp-fetch-service > +export MOJO_WORKSPACE=devel > +export MOJO_SERIES=jammy > +export > MOJO_SPEC=git+https://git.launchpad.net/~launchpad/launchpad-mojo-specs/+git/private Ok makes sense. I have updated it to `$HOME/spec` and I'm guessing I'll have to create that local directory. Hopefully this can eventually be made public and we can use the public git address here. > +export MOJO_STAGE=lp-fetch-service/devel > + > +Then run the spec using Mojo: > + > +mojo project-new -c containerless > +mojo workspace-new > +mojo run > + > +You must have python3-yaml installed. > diff --git a/lp-fetch-service/bundle.yaml b/lp-fetch-service/bundle.yaml > new file mode 100644 > index 000..286 > --- /dev/null > +++ b/lp-fetch-service/bundle.yaml > @@ -0,0 +1,22 @@ > +{%- if stage_name == "production" %} > +{%- set devel = False %} > +{%- elif stage_name == "staging" %} > +{%- set devel = False %} > +{%- else %} > +{%- set devel = True %} > +{%- endif -%} > + > +series: jammy > +applications: > +{%- if devel or stage_name == "staging" %} Great point, updated! > + fetch-service: > +{#- While the fetch-service charm and snap are not public, we are > deploying > +a locally built charm. The lines below should be replaced with the > path > +to charmhub, channel and revision number once the charm and snap are > +public. Currently, this expects the charm and snap to be copied to > the > +path where the bundle.yaml is rendered, in the mojo project folder > (eg. > +.../mojo/lp-fetch-service/jammy/devel/charms/lp-fetch-service/). #} > +charm: "./fetch-service_ubuntu-22.04-amd64.charm" > +resources: > + snap: "./fetch-service.snap" > +{%- endif %} > diff --git a/lp-fetch-service/verify b/lp-fetch-service/verify > new file mode 100755 > index 000..df9e6ef > --- /dev/null > +++ b/lp-fetch-service/verify > @@ -0,0 +1,8 @@ > +#! /bin/sh > +set -e > + > +TOP="${0%/*}" > + > +export > EXTRA_SKIP_CHECKS="check_swap${EXTRA_SKIP_CHECKS:+|${EXTRA_SKIP_CHECKS}}" My only reason why we want to do it is that it is skipped in all other specs. I understand that that might not be a good enough answer here, but I can't really find the reason why it is like that in every other spec as I can't find any mentions of it within comments. Some info about this check: https://nagios-plugins.org/doc/man/check_swap.html Some info about swap space: https://help.ubuntu.com/community/SwapFaq I'll try to investigate and add a comment in the spec with the information I find, but for now I'll keep the SKIP in the code > + > +exec "$TOP/utils/verify" -- https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461232 Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
Review: Approve Diff comments: > diff --git a/lp-fetch-service/README.md b/lp-fetch-service/README.md > new file mode 100644 > index 000..65e09cb > --- /dev/null > +++ b/lp-fetch-service/README.md > @@ -0,0 +1,21 @@ > +# Launchpad fetch service > + > +This spec deploys Launchpad's fetch service. > + > +You can run it locally using Juju's LXD support and Mojo. First, configure > +your environment: > + > +export MOJO_ROOT="$HOME/.local/share/mojo" > +export MOJO_PROJECT=mojo-lp-fetch-service > +export MOJO_WORKSPACE=devel > +export MOJO_SERIES=jammy > +export > MOJO_SPEC=git+https://git.launchpad.net/~launchpad/launchpad-mojo-specs/+git/private This wouldn't work with a private repository like the target of this MP. A pattern I have seen used in these cases is to specify the local filesystem path to the specs repository. For example, `MOJO_SPEC=/home/stg-vbuilder/spec`. > +export MOJO_STAGE=lp-fetch-service/devel > + > +Then run the spec using Mojo: > + > +mojo project-new -c containerless > +mojo workspace-new > +mojo run > + > +You must have python3-yaml installed. > diff --git a/lp-fetch-service/bundle.yaml b/lp-fetch-service/bundle.yaml > new file mode 100644 > index 000..286 > --- /dev/null > +++ b/lp-fetch-service/bundle.yaml > @@ -0,0 +1,22 @@ > +{%- if stage_name == "production" %} > +{%- set devel = False %} > +{%- elif stage_name == "staging" %} > +{%- set devel = False %} > +{%- else %} > +{%- set devel = True %} > +{%- endif -%} > + > +series: jammy > +applications: > +{%- if devel or stage_name == "staging" %} Afaik, qastaging has working builders but staging doesn't. Are we looking to deploy this on staging in spite of that? If yes, let us also include qastaging. > + fetch-service: > +{#- While the fetch-service charm and snap are not public, we are > deploying > +a locally built charm. The lines below should be replaced with the > path > +to charmhub, channel and revision number once the charm and snap are > +public. Currently, this expects the charm and snap to be copied to > the > +path where the bundle.yaml is rendered, in the mojo project folder > (eg. > +.../mojo/lp-fetch-service/jammy/devel/charms/lp-fetch-service/). #} > +charm: "./fetch-service_ubuntu-22.04-amd64.charm" > +resources: > + snap: "./fetch-service.snap" > +{%- endif %} > diff --git a/lp-fetch-service/verify b/lp-fetch-service/verify > new file mode 100755 > index 000..df9e6ef > --- /dev/null > +++ b/lp-fetch-service/verify > @@ -0,0 +1,8 @@ > +#! /bin/sh > +set -e > + > +TOP="${0%/*}" > + > +export > EXTRA_SKIP_CHECKS="check_swap${EXTRA_SKIP_CHECKS:+|${EXTRA_SKIP_CHECKS}}" Is there a reason why we want to disable the `check_swap` check? > + > +exec "$TOP/utils/verify" -- https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461232 Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master
Ines Almeida has proposed merging ~ines-almeida/launchpad-mojo-specs/+git/private:lp-fetch-service into ~launchpad/launchpad-mojo-specs/+git/private:master. Commit message: Add barebones of lp-fetch-service mojo spec While the charm and snap are not public, they require manually building, and deploying from the local charm Requested reviews: Jürgen Gmach (jugmac00) For more details, see: https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/461232 Resubmitting this MP to update the target branch. This was tested deploying locally. Will try deploying in staging once this MP is reviewed and approved. The general structure was based on similar lp specs. -- Your team Launchpad code reviewers is subscribed to branch ~launchpad/launchpad-mojo-specs/+git/private:master. diff --git a/lp-fetch-service/README.md b/lp-fetch-service/README.md new file mode 100644 index 000..65e09cb --- /dev/null +++ b/lp-fetch-service/README.md @@ -0,0 +1,21 @@ +# Launchpad fetch service + +This spec deploys Launchpad's fetch service. + +You can run it locally using Juju's LXD support and Mojo. First, configure +your environment: + +export MOJO_ROOT="$HOME/.local/share/mojo" +export MOJO_PROJECT=mojo-lp-fetch-service +export MOJO_WORKSPACE=devel +export MOJO_SERIES=jammy +export MOJO_SPEC=git+https://git.launchpad.net/~launchpad/launchpad-mojo-specs/+git/private +export MOJO_STAGE=lp-fetch-service/devel + +Then run the spec using Mojo: + +mojo project-new -c containerless +mojo workspace-new +mojo run + +You must have python3-yaml installed. diff --git a/lp-fetch-service/bundle.yaml b/lp-fetch-service/bundle.yaml new file mode 100644 index 000..286 --- /dev/null +++ b/lp-fetch-service/bundle.yaml @@ -0,0 +1,22 @@ +{%- if stage_name == "production" %} +{%- set devel = False %} +{%- elif stage_name == "staging" %} +{%- set devel = False %} +{%- else %} +{%- set devel = True %} +{%- endif -%} + +series: jammy +applications: +{%- if devel or stage_name == "staging" %} + fetch-service: +{#- While the fetch-service charm and snap are not public, we are deploying +a locally built charm. The lines below should be replaced with the path +to charmhub, channel and revision number once the charm and snap are +public. Currently, this expects the charm and snap to be copied to the +path where the bundle.yaml is rendered, in the mojo project folder (eg. +.../mojo/lp-fetch-service/jammy/devel/charms/lp-fetch-service/). #} +charm: "./fetch-service_ubuntu-22.04-amd64.charm" +resources: + snap: "./fetch-service.snap" +{%- endif %} diff --git a/lp-fetch-service/configs/custom-secgroups-staging.yaml b/lp-fetch-service/configs/custom-secgroups-staging.yaml new file mode 100644 index 000..78f1546 --- /dev/null +++ b/lp-fetch-service/configs/custom-secgroups-staging.yaml @@ -0,0 +1,9 @@ +applications: +fetch-service: +type: neutron +rules: +- rsync-logs +rules: +rsync-logs: +# Allow launchpad-bastion-ps5 to fetch logs. +- {"protocol": "tcp", "family": "IPv4", "port": 873, "cidr": "10.131.10.100/32"} diff --git a/lp-fetch-service/manifest b/lp-fetch-service/manifest new file mode 12 index 000..e1c38b1 --- /dev/null +++ b/lp-fetch-service/manifest @@ -0,0 +1 @@ +manifests/deploy \ No newline at end of file diff --git a/lp-fetch-service/manifest-perform-autodeploy b/lp-fetch-service/manifest-perform-autodeploy new file mode 12 index 000..e1c38b1 --- /dev/null +++ b/lp-fetch-service/manifest-perform-autodeploy @@ -0,0 +1 @@ +manifests/deploy \ No newline at end of file diff --git a/lp-fetch-service/manifest-verify b/lp-fetch-service/manifest-verify new file mode 12 index 000..6e02de4 --- /dev/null +++ b/lp-fetch-service/manifest-verify @@ -0,0 +1 @@ +manifests/verify \ No newline at end of file diff --git a/lp-fetch-service/manifests/deploy b/lp-fetch-service/manifests/deploy new file mode 100644 index 000..2d52196 --- /dev/null +++ b/lp-fetch-service/manifests/deploy @@ -0,0 +1,5 @@ +script config=predeploy +bundle config=bundle.yaml max-wait=900 local=deploy-secrets +juju-check-wait +include config=manifests/secgroups +include config=manifests/verify diff --git a/lp-fetch-service/manifests/secgroups b/lp-fetch-service/manifests/secgroups new file mode 100644 index 000..8c438ee --- /dev/null +++ b/lp-fetch-service/manifests/secgroups @@ -0,0 +1 @@ +script config=utils/custom-secgroups.py SKIP_STAGES=devel diff --git a/lp-fetch-service/manifests/verify b/lp-fetch-service/manifests/verify new file mode 100644 index 000..f25f902 --- /dev/null +++ b/lp-fetch-service/manifests/verify @@ -0,0 +1,4 @@ +juju-check-wait +# It occasionally takes a little while for all the servers to start +# accepting connections. +verify retry=3 diff --git a/lp-fetch-service/predeploy b/lp-fetch-service/predeploy new file mode 100755