10000 run planet from dockerized containers, unblock dist upgrade by ewdurbin · Pull Request #568 · python/psf-salt · GitHub
[go: up one dir, main page]

Skip to content

run planet from dockerized containers, unblock dist upgrade #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
run planet from dockerized containers, unblock dist upgrade
  • Loading branch information
ewdurbin committed May 1, 2025
commit 5ff8c9af5be321769530f0a8b0c6d464b2c631d8
10 changes: 9 additions & 1 deletion pillar/base/planet.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@ planet:
- planetpython.org
- www.planetpython.org
sites:
planetpython.org:
planetpython:
cache: /srv/cache/
output: /srv/planetpython.org/
image: ghcr.io/python/planetpython:latest
config: config.ini
planetpython-3:
cache: /srv/cache3/
output: /srv/planetpython.org/3/
image: ghcr.io/python/planetpython-3:latest
config: config.ini
9 changes: 7 additions & 2 deletions salt/planet/config/run-planet.sh.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
cd /srv/planet/
git pull
{% for site in salt["pillar.get"]("planet", {}).get("sites").values() %}
$(which python2.7) /srv/planet/code/planet.py /srv/planet/config/{{ site["config"] }}
{% for site, site_config in salt["pillar.get"]("planet", {}).get("sites").items() %}
docker run --rm -it \
-v {{ site_config["cache"] }}:/srv/cache/ \
-v {{ site_config["output"] }}:/srv/planetpython.org/ \
-v /srv/planet/config/{{ site_config["config"] }}:/planet/config/config.ini \
{{ site_config["image"] }} \
python /planet/code/planet.py /planet/config/config.ini
{% endfor %}
12 changes: 11 additions & 1 deletion salt/planet/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ include:
git:
pkg.installed

docker.io:
pkg.installed
docker:
service.running:
- enable: True

planet-user:
user.present:
- name: planet
- createhome: False
- groups:
- docker
- require:
- pkg: docker.io

/etc/nginx/sites.d/planet.conf:
file.managed:
Expand Down Expand Up @@ -40,7 +50,7 @@ planet-user:

https://github.com/python/planet:
git.latest:
- branch: py2
- branch: main
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're effectively just using this for the config file now, so back to main.

- target: /srv/planet/
- user: planet
- require:
Expand Down
0