-
Notifications
You must be signed in to change notification settings - Fork 135
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
PMM-12530 run supervisor as non root #2643
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
ab1acd8
PMM-12530 remove clickhouse upgrade role
ademidoff 027be28
PMM-12530 set pmm user for supervisord jobs
ademidoff f21c888
PMM-12530 move supervisord configs to the role
ademidoff 60c5ca1
PMM-12530 move non-docker tasks to their own playbook
ademidoff 194e5ca
PMM-12530 fix wrong copy of grafana.ini
ademidoff 51434b9
PMM-12530 fix wrong description
ademidoff bee6fb6
PMM-12530 a few description fixes
ademidoff 4fa4250
PMM-12530 fix wrong task syntax
ademidoff c9d2b83
PMM-12530 use loop instead of with_items
ademidoff dbfa806
PMM-12530 use a different become method for supervisorctl
ademidoff 0181a73
PMM-12530 use a command to restart grafana
ademidoff 600c2b0
PMM-12530 use an interim Dockerfile
ademidoff 0c185bf
PMM-12530 update the port in the docs
ademidoff 915e0dd
PMM-12530 remove the service task
ademidoff d0c78ad
PMM-12530 use a base Dockerfile
ademidoff f5b1805
PMM-12530 remove user creation for non-docker
ademidoff d5b67a1
PMM-12530 provision deps for the base image
ademidoff c506b6a
PMM-12530 clean up supervisord role
ademidoff 78e40b4
PMM-12530 put back dummy creds
ademidoff e6fc9b5
PMM-12530 clean up ansible scripts
ademidoff b125a85
PMM-12530 change ownership of the distro file
ademidoff 82118d0
PMM-12530 update the entrypoint
ademidoff a464bab
PMM-12530 remove support for v1 paths
ademidoff a136077
PMM-12530 remove supervisord.service
ademidoff 5a4e378
PMM-12530 add a config for ansible
ademidoff d4773c3
PMM-12530 fix permissions for maintenance file
ademidoff f9ada73
PMM-12530 move ansible to the build directory
ademidoff c769b10
PMM-12530 switch to pmm user
ademidoff 529ef14
PMM-12530 clean up Dockerfile
ademidoff 7767b10
PMM-12530 optimize entrypoint and dir creation tasks
ademidoff 514999e
PMM-12530 fix nginx failures
ademidoff 8c80ddc
PMM-12530 fix the syntax error
ademidoff 7e565f3
PMM-12530 remove comments
ademidoff a58bcee
PMM-12530 update the easy install script
ademidoff 263eefa
PMM-12530 move ansible lint checks to a proper Makefile
ademidoff 769479a
PMM-12530 fix wrong syntaxt in docker volume
ademidoff b0b32b1
PMM-12530 update the task description
ademidoff 03d2f50
PMM-12530 send nginx logs to /dev/std{err,out}
ademidoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
|
||
daemon off; | ||
|
||
error_log stderr info; | ||
error_log /dev/stderr info; | ||
# error_log stderr debug; | ||
|
||
events { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,36 +66,39 @@ pmm-ami: | |
-var 'pmm_client_repo_name=percona-experimental-x86_64' \ | ||
-var 'pmm_server_repo=experimental' \ | ||
-only amazon-ebs -color=false \ | ||
packer/pmm.json | ||
packer/pmm.json | ||
|
||
pmm-ami-rc: | ||
docker run --rm -v ${HOME}/.aws:/root/.aws -v `pwd`:/build -w /build hashicorp/packer:${PACKER_VERSION} \ | ||
build -var 'pmm_client_repos=original testing' \ | ||
-var 'pmm_client_repo_name=percona-testing-x86_64' \ | ||
-var 'pmm_server_repo=testing' \ | ||
-only amazon-ebs '-color=false' \ | ||
packer/pmm.json | ||
-var 'pmm_client_repo_name=percona-testing-x86_64' \ | ||
-var 'pmm_server_repo=testing' \ | ||
-only amazon-ebs '-color=false' \ | ||
packer/pmm.json | ||
|
||
pmm-ami-el9: | ||
mkdir -p update && \ | ||
cp -r ../update/ansible/playbook/* update/ && \ | ||
sed -i 's|become_method: su|become_method: sudo|g' update/tasks/roles/postgres/tasks/main.yml && \ | ||
sed -i 's|become_method: su|become_method: sudo|g' ./roles/postgres/tasks/main.yml && \ | ||
docker run --rm -v ${HOME}/.aws:/root/.aws -v `pwd`:/build -w /build hashicorp/packer:${PACKER_VERSION} \ | ||
build -var 'pmm_client_repos=original experimental' \ | ||
-var 'pmm_client_repo_name=percona-experimental-x86_64' \ | ||
-var 'pmm_server_repo=experimental' \ | ||
-only amazon-ebs -color=false \ | ||
packer/pmm.el9.json | ||
packer/pmm.el9.json | ||
|
||
pmm-ami-el9-rc: | ||
mkdir -p update && \ | ||
cp -r ../update/ansible/playbook/* update/ && \ | ||
sed -i 's|become_method: su|become_method: sudo|g' update/tasks/roles/postgres/tasks/main.yml && \ | ||
docker run --rm -v ${HOME}/.aws:/root/.aws -v `pwd`:/build -w /build hashicorp/packer:${PACKER_VERSION} \ | ||
build -var 'pmm_client_repos=original testing' \ | ||
-var 'pmm_client_repo_name=percona-testing-x86_64' \ | ||
sed -i 's|become_method: su|become_method: sudo|g' ./roles/postgres/tasks/main.yml && \ | ||
docker run --rm -v ${HOME}/.aws:/root/.aws -v `pwd`:/build -w /build hashicorp/packer:${PACKER_VERSION} \ | ||
build -var 'pmm_client_repos=original testing' \ | ||
-var 'pmm_client_repo_name=percona-testing-x86_64' \ | ||
-var 'pmm_server_repo=testing' \ | ||
-only amazon-ebs '-color=false' \ | ||
packer/pmm.el9.json | ||
-only amazon-ebs '-color=false' \ | ||
packer/pmm.el9.json | ||
|
||
## ----------------- PACKER ------------------ | ||
|
||
check: ## Run required checkers and linters | ||
ansible-playbook --syntax-check ansible/pmm-docker/update.yml | ||
ansible-playbook --check ansible/pmm-docker/update.yml | ||
ansible-lint ansible/pmm-docker/update.yml | ||
Comment on lines
+101
to
+104
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍🏼 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This is the default ansible.cfg file. | ||
# It necessary for ansible to work properly when it acts as 'pmm' user. | ||
# Otherwise, it will fail with 'Permission denied' error since the default paths are '/root/.ansible/tmp' | ||
# Ref: https://github.com/ansible/ansible/blob/stable-2.9/examples/ansible.cfg | ||
[defaults] | ||
|
||
remote_tmp = /tmp | ||
local_tmp = /tmp | ||
|
||
# additional paths to search for roles in, colon separated | ||
roles_path = /opt/ansible/roles |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
update/ansible/playbook/tasks/create-lvm.yml → build/ansible/pmm/create-lvm.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to PR: why do we need these seds? don't we have this kind of logic in ansible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, anyway it will be dropped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't much know what to do with the seds, so just ended up updating the paths.
We needed these seds because in AMI we have to use
sudo
instead ofsu
.Now it will be a totally different story, as you mentioned )