You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@skywalking.apache.org by "rabajaj0509 (via GitHub)" <gi...@apache.org> on 2023/07/31 00:12:45 UTC
[GitHub] [skywalking-terraform] rabajaj0509 opened a new pull request, #12: Implement env variables support for WebUI systemd unit file
rabajaj0509 opened a new pull request, #12:
URL: https://github.com/apache/skywalking-terraform/pull/12
This commit introduces the use of environment variables for the systemd unit file of our service. The following changes were made:
1. Defined environment variables in an Ansible role, under defaults/main.yml. This includes the SkyWalking version, SkyWalking UI server port, and SkyWalking OAP server port.
2. Created an environment file that includes these variables. The path to this environment file is also defined in the Ansible defaults of the role.
3. Updated the systemd unit file to use the environment file. This ensures the service process has access to the correct environment variables.
These changes will enable better configurability of our service and reduce the likelihood of hardcoding values in our scripts and systemd unit files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-terraform] kezhenxu94 commented on a diff in pull request #12: Implement env variables support for WebUI systemd unit file
Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 commented on code in PR #12:
URL: https://github.com/apache/skywalking-terraform/pull/12#discussion_r1278675655
##########
ansible/roles/skywalking/vars/main.yml:
##########
@@ -15,3 +15,10 @@
---
skywalking_version: "9.5.0"
+sw_server_port: "8080"
+sw_oap_server_port: 12800
+
+env_vars:
Review Comment:
Let's prefix this with `sw_ui_`, because I believe we will have `sw_oap_env_vars` soon
##########
ansible/roles/skywalking/vars/main.yml:
##########
@@ -15,3 +15,10 @@
---
skywalking_version: "9.5.0"
+sw_server_port: "8080"
+sw_oap_server_port: 12800
+
+env_vars:
+ SW_SERVER_PORT: "{{ sw_ui_server_port }}"
+ SW_OAP_ADDRESS: "{{ hostvars[groups['skywalking-oap'][0]].ansible_host }}:{{ sw_oap_server_port }}"
+env_file: /usr/local/skywalking/webapp/webui_env
Review Comment:
Let's prefix this with `sw_ui_`, because I believe we will have `sw_oap_env_file` soon
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-terraform] rabajaj0509 commented on a diff in pull request #12: Implement env variables support for WebUI systemd unit file
Posted by "rabajaj0509 (via GitHub)" <gi...@apache.org>.
rabajaj0509 commented on code in PR #12:
URL: https://github.com/apache/skywalking-terraform/pull/12#discussion_r1278760222
##########
ansible/roles/skywalking/vars/main.yml:
##########
@@ -15,3 +15,10 @@
---
skywalking_version: "9.5.0"
+sw_server_port: "8080"
+sw_oap_server_port: 12800
+
+env_vars:
+ SW_SERVER_PORT: "{{ sw_ui_server_port }}"
+ SW_OAP_ADDRESS: "{{ hostvars[groups['skywalking-oap'][0]].ansible_host }}:{{ sw_oap_server_port }}"
Review Comment:
Is it ok to address the cluster mode in the next PR? It might require changes in the way we handle ansible inventory.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-terraform] kezhenxu94 commented on a diff in pull request #12: Implement env variables support for WebUI systemd unit file
Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 commented on code in PR #12:
URL: https://github.com/apache/skywalking-terraform/pull/12#discussion_r1278674698
##########
ansible/roles/skywalking/vars/main.yml:
##########
@@ -15,3 +15,10 @@
---
skywalking_version: "9.5.0"
+sw_server_port: "8080"
+sw_oap_server_port: 12800
+
+env_vars:
+ SW_SERVER_PORT: "{{ sw_ui_server_port }}"
+ SW_OAP_ADDRESS: "{{ hostvars[groups['skywalking-oap'][0]].ansible_host }}:{{ sw_oap_server_port }}"
Review Comment:
Some hints:
- We can configure multiple addresses here when in cluster mode, e.g, http://1.2.3.4:12800,http://1.2.3.5:12800
- We need `http://` prefix for each of the OAP addresses, e.g., http://1.2.3.4:12800
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-terraform] kezhenxu94 commented on a diff in pull request #12: Implement env variables support for WebUI systemd unit file
Posted by "kezhenxu94 (via GitHub)" <gi...@apache.org>.
kezhenxu94 commented on code in PR #12:
URL: https://github.com/apache/skywalking-terraform/pull/12#discussion_r1278673720
##########
ansible/roles/skywalking/vars/main.yml:
##########
@@ -15,3 +15,10 @@
---
skywalking_version: "9.5.0"
+sw_server_port: "8080"
Review Comment:
you mean?
```suggestion
sw_ui_server_port: "8080"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-terraform] wu-sheng merged pull request #12: Implement env variables support for WebUI systemd unit file
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #12:
URL: https://github.com/apache/skywalking-terraform/pull/12
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org