Skip to content

Commit ee629ce

Browse files
authored
Migrate Moin (wiki.python.org) to static site (#631)
* install docs are stale * simplify check * no longger needed * name swap * rm state * name update prod * configs no no longer needed * same for scripts, no longer needed * update to wiki, nginx * add nginx conf for wiki * fix vagrant localdev conf
1 parent 2aaf790 commit ee629ce

24 files changed

Lines changed: 55 additions & 1249 deletions

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SERVERS = [
1313
{:name => "hg", :codename => "noble"},
1414
{:name => "loadbalancer", :codename => "noble", :ports => [20000, 20001, 20002, 20004, 20010, 20011]},
1515
"mail",
16-
"moin",
16+
{:name => "moin", :codename => "noble"},
1717
"planet",
1818
"pythontest",
1919
]

docs/guides/migration-recipe.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,29 @@ index 68387c9..7a8ace1 100644
9090
ssh root@NNN.NNN.NNN.NNN
9191
```
9292
2. Add Salt repositories for our current target version (add the apt-repo and install `salt-minion` package):
93-
> **Note**: Ensure you are adding the correct key/repository for the version of Ubuntu you are using.
93+
> **Note**: Ensure you are adding the correct key/repository for the version of Ubuntu you are using.
9494
>
95-
> See [the Salt installation guide](https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/ubuntu.html) for more information.
96-
```console
97-
UBUNTU_VERSION=$(lsb_release -rs)
98-
ARCH=$(dpkg --print-architecture)
99-
CODENAME=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d '=' -f 2)
100-
101-
echo "Adding the SaltStack repository key for $UBUNTU_VERSION $CODENAME ($ARCH)..."
102-
sudo curl -fsSL -o /etc/apt/keyrings/salt-archive-keyring-2024.gpg https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public
103-
echo "Adding the SaltStack repository for $UBUNTU_VERSION $CODENAME ($ARCH)..."
104-
echo "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2024.gpg arch=$ARCH] https://packages.broadcom.com/artifactory/saltproject-deb/ stable main" | sudo tee /etc/apt/sources.list.d/salt.list
105-
echo "Pinning Salt to v3006.*"
106-
RUN printf "Package: salt-*\nPin: version 3006.*\nPin-Priority: 1001\n" > /etc/apt/preferences.d/salt-pin-1001
95+
> See [the Salt installation guide](https://salt.tips/salt-install-guide/en/latest/topics/install-by-operating-system/linux-deb.html) for more information.
96+
```console
97+
# Ensure keyrings dir exists
98+
mkdir -m 755 -p /etc/apt/keyrings
99+
100+
# Download and dearmor the public key
101+
curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public \
102+
| gpg --dearmor | sudo tee /etc/apt/keyrings/salt-archive-keyring.pgp > /dev/null
103+
104+
# Create apt repo target configuration (DEB822 format)
105+
curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.sources \
106+
| sudo tee /etc/apt/sources.list.d/salt.sources
107+
108+
# Pin to Salt 3006 LTS
109+
echo 'Package: salt-*
110+
Pin: version 3006.*
111+
Pin-Priority: 1001' | sudo tee /etc/apt/preferences.d/salt-pin-1001
107112
```
108113
3. Install and configure the salt-minion. On `$new-host`, run the command
109114
```console
110-
apt-get update -y && apt-get install -y --no-install-recommends salt-minion
115+
sudo apt-get update -y && sudo apt-get install -y --no-install-recommends salt-minion
111116
```
112117
- On the `old-host`, look through `/etc/salt/minion.d*` to set up salt-minion configuration files to match on new-host:
113118
- Generate bash that will create these files

pillar/base/haproxy.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ haproxy:
8484
- wiki.jython.org
8585
verify_host: moin.psf.io
8686
rate_limit: 50
87-
check: "HEAD /moin/HelpContents HTTP/1.1\\r\\nHost:\\ wiki.python.org"
87+
check: "HEAD / HTTP/1.1\\r\\nHost:\\ wiki.python.org"
8888

8989
svn:
9090
domains:

pillar/base/moin.sls

Lines changed: 0 additions & 21 deletions
This file was deleted.

pillar/dev/roles.sls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ roles:
8383
purpose: ""
8484
contact: ""
8585
moin:
86-
pattern: "moin.vagrant.psf.io"
87-
purpose: ""
86+
pattern: "wiki.vagrant.psf.io"
87+
purpose: "Static wiki archive"
8888
contact: ""

pillar/dev/top.sls

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,4 @@ base:
9090

9191
'wiki':
9292
- match: nodegroup
93-
- moin
9493
- firewall.rs-lb-backend

pillar/prod/roles.sls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ roles:
8787
contact: "Infrastructure Staff"
8888
category: "infra-infra"
8989
moin:
90-
pattern: "moin*.nyc1.psf.io"
91-
purpose: "Hosts moin sites for wiki.python.org, wiki.jython.org"
92-
contact: "lemburg"
90+
pattern: "wiki*.nyc1.psf.io"
91+
purpose: "Static wiki archive for wiki.python.org, wiki.jython.org"
92+
contact: "Infrastructure Staff"
9393
category: "community"

pillar/prod/top.sls

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ base:
8787

8888
'moin':
8989
- match: nodegroup
90-
- mail-opt-out
9190
- firewall.rs-lb-backend
9291
- backup.moin
9392

salt/moin/configs/farmconfig.py

Lines changed: 0 additions & 182 deletions
This file was deleted.

0 commit comments

Comments
 (0)