wso2 / wso2/docs-apim

Why we can't use the Unit file method run the APIM

Open
#4,761 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

API-M-3.2.0 API-M-4.0.0 API-M-4.1.0 API-M-Master help wanted Type/Question
Dominant language
CSS
Stars
99
Forks
708
Avg merge
1d 7h
Merged PRs (30d)
22

Description

Description:
For running APIM we suggested a method to create and run the Linux service[1], but this method is not applicable to Redhat based Linux OSs.
But we can use the Unit file (systemctl utility) to run the wso2 products [2][3], this method is suitable for any kind of Linux OS.
This method is used in our ansible scripts too[4].
why we can't suggest this method in our doc too.

[Unit]
Description=WSO2 API Manager - Default profile
After=network.target

[Service]
Environment="JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk"
ExecStart=/mnt/apim/wso2am-4.0.0/bin/api-manager.sh start
ExecStop=/mnt/apim/wso2am-4.0.0/bin/api-manager.sh stop
ExecRestart=/mnt/apim/wso2am-4.0.0/bin/api-manager.sh restart
PIDFile=/mnt/apim/wso2am-4.0.0/wso2carbon.pid
User=root
Group=root
Type=forking
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=multi-user.target

Suggested Labels:
APIM, Linux services

Suggested Assignees:
ruthryi@wso2.com

Affected Product Version:
APIM-3.2.0, APIM-4.0.0

References
[1] https://apim.docs.wso2.com/en/latest/install-and-setup/install/installing-the-product/installing-api-m-as-a-linux-service/
[2] https://dzone.com/articles/run-your-java-application-as-a-service-on-ubuntu
[3] https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files
[4] https://github.com/wso2/ansible-apim/blob/4.0.x-old/roles/apim/templates/wso2apim.service.j2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Linux service installation documentation and the wso2apim.service.j2 template in the referenced Ansible repository. Compare the current service method with the provided systemd unit example and document a suitable approach for Red Hat-based and other Linux systems. Done means the APIM documentation explains how to configure and run the service using a unit file.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, linux
Domain
documentation, operating-systems
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.