Get started with Jira Service Management for admins
Your first stop for learning how to get started with Jira Service Management.
This article highlights a new alerting feature that's natively available in Jira Service Management which is gradually rolling out to some Jira Service Management Cloud customers. It may not yet be visible or available on your site.
Use these commands to start, stop, and restart JEC respectively:
Shell
1
2
3
sudo systemctl start jec
sudo systemctl stop jec
sudo systemctl restart jec
Example usage with environment variables:
Shell
1
2
3
4
5
sudo systemctl set-environment JEC_CONF_SOURCE_TYPE=git
sudo systemctl set-environment JEC_CONF_GIT_URL=git@gitlab.com:metehan2/test-private-conf.git
sudo systemctl set-environment JEC_CONF_GIT_PRIVATE_KEY_FILEPATH=~/.ssh/id_rsa
sudo systemctl set-environment JEC_CONF_GIT_FILEPATH=~/jec/conf/jec-config.json
sudo systemctl start jec
or
Shell
1
2
3
sudo systemctl set-environment JEC_CONF_SOURCE_TYPE=local
sudo systemctl set-environment JEC_CONF_LOCAL_FILEPATH=~/jec/conf/jec-config.json
sudo systemctl start jec
Shell
1
2
3
4
5
sudo service jec start
sudo service jec stop
sudo service jec restart
# Environment variables can be put in bash configuration files
SIGINT and SIGTERM signals are used to stop JEC. You can’t stop/restart JEC via native methods of Windows while using JEC as a service. It is provided as a helper executable to run JEC as a service.
You can set environment variables(Env) and arguments(Args) via jecService<32|64>.json as follows:
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"Name": "JEC Service",
"DisplayName": "JEC Service",
"Description": "Run the JEC Service",
"JECPath" : "C:\\Users\\Administrator\\Desktop\\JiraEdgeConnector<32|64>.exe",
"Args" : ["-jec-metrics", "7070"],
"Env": [
"JEC_CONF_LOCAL_FILEPATH=C:\\Users\\Administrator\\Desktop\\jec-config.json",
"JEC_CONF_SOURCE_TYPE=local"
],
"Stderr": "C:\\Users\\Administrator\\Desktop\\jecErr.log",
"Stdout": "C:\\Users\\Administrator\\Desktop\\jecOut.log"
}
Use these commands to start, stop, and restart JEC version amd64:
Shell
1
2
3
jecService64.exe start
jecService64.exe stop
jecService64.exe restart
Use these commands start, stop, and restart JEC version 386:
Shell
1
2
3
jecService32.exe start
jecService32.exe stop
jecService32.exe restart
Clone the repository: https://github.com/atlassian/jec.git
Run docker build . -t jec
Since JEC uses configuration files to run, you need to provide volumes to Docker container so that the files are accessible from the container. You also need to provide environment variables explained in the article to the container.
An example command to run docker container:
Shell
1
2
3
4
5
docker run -ti \
-v /Users/foo/Documents/bar:/home/jsm \
-e JEC_CONF_SOURCE_TYPE="local" \
-e JEC_CONF_LOCAL_FILEPATH="/home/jsm/JEC.yaml" \
JEC
The command runs the container with two environment variables and creates a volume between the “bar” folder in host machine and “jsm” folder in the container. Since you are using docker container to run JEC, you need to give the file paths according to the container, not to the host machine.
If you want to use the configuration from your repository, add your ssh_known_hosts file to image by using a volume. You may also need to set SSH_KNOWN_HOSTS environment variable to your ssh_know_hosts file path in the image. Following is an example command to run JEC using a configuration file from a repository. The command also creates additional volume to access the log files from the host machine.
Shell
1
2
3
4
5
6
7
8
9
docker run -ti \
-v /Users/erenkizilay/Documents/dummyDir:/home/jsm \
-v /Users/erenkizilay/Documents/dummyDir:/var/log/jec \
-v /Users/erenkizilay/.ssh/known_hosts:/etc/ssh/ssh_known_hosts \
-e JEC_CONF_SOURCE_TYPE="git" -e JEC_CONF_GIT_FILEPATH=/config.json \
-e JEC_CONF_GIT_PRIVATE_KEY_FILEPATH=/var/log/jec/id_rsa \
-e JEC_CONF_GIT_URL=git@gitlab.com:erenkizilay/JEC-conf.git \
-e SSH_KNOWN_HOSTS=/etc/ssh/ssh_known_hosts \
JEC
Was this helpful?