Skip to content

Commit

Permalink
update service playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
Vonng committed Mar 17, 2021
1 parent 3add538 commit 7ef656a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
34 changes: 23 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@ cache:
scp -r meta:/tmp/pkg.tgz files/pkg.tgz
ssh -t meta "sudo rm -rf /tmp/pkg.tgz"

# fetch pkg.tgz release packages from github
fetch:
open https://github.com/Vonng/pigsty/releases/download/v0.5.0/pkg.tgz

# download pkg.tgz release packages from CDN
download:
curl http://pigsty-1304147732.cos.accelerate.myqcloud.com/pkg.tgz -o files/pkg.tgz
curl http://pigsty-1304147732.cos.accelerate.myqcloud.com/latest/pkg.tgz -o files/pkg.tgz

# download latest pigsty source code tarball
download-pigsty:
curl http://pigsty-1304147732.cos.accelerate.myqcloud.com/latest/pigsty.tar.gz -o files/pigsty.tgz

# download pkg.tgz from github release
downlaod2:
open https://github.com/Vonng/pigsty/releases/download/v0.8.0/pkg.tgz

# fast provisioning on sandbox
init:
Expand Down Expand Up @@ -204,12 +209,19 @@ env-prod: env-clean
# misc
###############################################################
svg:
ansible-playbook-grapher infra.yml -o infra
ansible-playbook-grapher --include-role-tasks infra.yml -o infra-full
ansible-playbook-grapher pgsql.yml -o pgsql
ansible-playbook-grapher --include-role-tasks pgsql.yml -o pgsql-full
ansible-playbook-grapher sandbox.yml -o sandbox
ansible-playbook-grapher --include-role-tasks sandbox.yml -o sandbox-full
mkdir -p play || true
ansible-playbook-grapher infra.yml -o play/infra
ansible-playbook-grapher --include-role-tasks infra.yml -o play/infra-full
ansible-playbook-grapher pgsql.yml -o play/pgsql
ansible-playbook-grapher --include-role-tasks pgsql.yml -o play/pgsql-full
ansible-playbook-grapher sandbox.yml -o play/sandbox
ansible-playbook-grapher --include-role-tasks sandbox.yml -o play/sandbox-full
ansible-playbook-grapher pgsql-remove.yml -o play/pgsql-remove
ansible-playbook-grapher pgsql-monitor.yml -o play/pgsql-monitor
ansible-playbook-grapher pgsql-createuser.yml -o play/pgsql-createuser
ansible-playbook-grapher pgsql-createdb.yml -o play/pgsql-createdb
ansible-playbook-grapher pgsql-service.yml -o play/pgsql-service


###############################################################
# kubernetes management (Obsolete)
Expand Down
3 changes: 2 additions & 1 deletion pgsql-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
tags: vip_l4
tasks:
- include_tasks: roles/service/tasks/vip_l4_config.yml
when: vip_mode == 'l4'
- include_tasks: roles/service/tasks/vip_l4_reload.yml

when: vip_mode == 'l4'
...
2 changes: 1 addition & 1 deletion pigsty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ all: # top-level namespace, match all hosts
comment: test user

# simple example for personal user definition
- name: dbuser_vonng2 # personal user example which only have limited access to offline instance
- name: dbuser_vonng # personal user example which only have limited access to offline instance
password: DBUser.Vonng # or instance with explict mark `pg_offline_query = true`
roles: [dbrole_offline] # personal/stats/ETL user should be grant with dbrole_offline
expire_in: 365 # expire in 365 days since creation
Expand Down
1 change: 1 addition & 0 deletions templates/vip_l4_payload.j2

0 comments on commit 7ef656a

Please sign in to comment.