Skip to content

Commit

Permalink
Merge pull request #335 from python/codespeed_upgrade
Browse files Browse the repository at this point in the history
restore codespeed local development
  • Loading branch information
cegerhardson committed Jan 18, 2024
2 parents d633151 + 1700306 commit 13984a9
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 23 deletions.
3 changes: 1 addition & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SERVERS = [
{:name => "bugs", :box => "ubuntu/xenial64", :codename => "xenial", :ports => [8080]},
"buildbot",
"cdn-logs",
"codespeed",
{:name => "codespeed", :codename => "jammy"},
{:name => "consul", :codename => "jammy"},
"docs",
"downloads",
Expand All @@ -15,7 +15,6 @@ SERVERS = [
"mail",
"moin",
"planet",
"postgresql",
"pypy-web",
"pythontest",
"web-pypa",
Expand Down
2 changes: 1 addition & 1 deletion pillar/base/codespeed.sls
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ codespeed-instances:
db_name: codespeed-cpython
port: 9000
source: https://github.com/python/codespeed.git
source_ref: old-speed.python.org
source_ref: speed.python.org
python_version: python3
module: speed_python
wsgi_app: speed_python.wsgi:application
Expand Down
4 changes: 2 additions & 2 deletions pillar/dev/postgres/clusters.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
postgresql-clusters:
pg-vagrant-psf-io:
host: postgresql-primary.vagrant.psf.io
host: salt-master.vagrant.psf.io
port: 5432
sslmode: verify-ca
sslmode: verify-full
ca_cert_pillar: 'tls:ca:PSF_CA'
4 changes: 2 additions & 2 deletions pillar/dev/roles.sls
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ roles:
purpose: ""
contact: ""
postgresql:
pattern: "postgresql-*.vagrant.psf.io"
pattern: "salt-master.vagrant.psf.io"
purpose: ""
contact: ""
postgresql-primary:
pattern: "postgresql-primary.vagrant.psf.io"
pattern: "salt-master.vagrant.psf.io"
purpose: ""
contact: ""
postgresql-replica:
Expand Down
5 changes: 5 additions & 0 deletions pillar/dev/secrets/codespeed.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
codespeed-secrets:
cpython:
secret_key: deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
pypy:
secret_key: beefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdead
9 changes: 9 additions & 0 deletions pillar/dev/secrets/postgresql-users/codespeed.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
postgresql-users:
codespeed-cpython:
cluster: pg-vagrant-psf-io
dbname: codespeed-cpython
password: insecurepasswordlol
codespeed-pypy:
cluster: pg-vagrant-psf-io
dbname: codespeed-pypy
password: insecurepasswordlol
23 changes: 10 additions & 13 deletions pillar/dev/top.sls
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ base:
- fastly-logging
- firewall.fastly-logging

'codespeed':
- match: nodegroup
- firewall.codespeed
- secrets.codespeed
- secrets.postgresql-users.codespeed
- codespeed

'docs':
- match: nodegroup
- firewall.rs-lb-backend
Expand Down Expand Up @@ -60,26 +67,16 @@ base:
- planet
- firewall.http

'postgresql':
'salt-master':
- match: nodegroup
- firewall.salt
- pebble
- firewall.postgresql
- postgresql.server
- postgres.databases

'postgresql-primary':
- match: nodegroup
- secrets.postgresql-admin
- secrets.postgresql-users.all

'postgresql-replica':
- match: nodegroup
- secrets.postgresql-users.replica

'salt-master':
- match: nodegroup
- firewall.salt
- pebble

'tracker':
- match: nodegroup
- secrets.postgresql-users.tracker
Expand Down
2 changes: 1 addition & 1 deletion salt/codespeed/config/django-settings.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DATABASES = {
"USER": "{{ db_user}}",
"PASSWORD": "{{ db_pass }}",
"OPTIONS": {
"sslmode": "verify-full",
"sslmode": "verify-ca",
"sslrootcert": "{{ db_cert }}",
},
}
Expand Down
6 changes: 4 additions & 2 deletions salt/codespeed/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ codespeed-deps:
- pkgs:
- git
- mercurial
- python-dev
- python3-dev
- python-virtualenv
- python3-virtualenv
{% if grains["oscodename"] != "jammy" %}
- python-dev
- python-virtualenv
{% endif %}
- build-essential
- libpq-dev

Expand Down

0 comments on commit 13984a9

Please sign in to comment.