From 90de0b730db9cbd429ea3a0064b2c02ae45db0c3 Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com> Date: Tue, 15 Aug 2023 15:41:09 +0800 Subject: [PATCH] feat: add openim server template file Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- deployments/templates/init/openim-api.service | 9 +++++---- .../templates/init/openim-cmdutils.service | 15 +++++++++++++++ .../templates/init/openim-crontask.service | 2 +- .../templates/init/openim-msggateway.service | 15 +++++++++++++++ .../templates/init/openim-msgtransfer.service | 15 +++++++++++++++ deployments/templates/init/openim-push.service | 15 +++++++++++++++ .../templates/init/openim-rpc-auth.service | 15 +++++++++++++++ .../init/openim-rpc-conversation.service | 15 +++++++++++++++ .../templates/init/openim-rpc-friend.service | 15 +++++++++++++++ .../templates/init/openim-rpc-group.service | 15 +++++++++++++++ deployments/templates/init/openim-rpc-msg.service | 15 +++++++++++++++ .../templates/init/openim-rpc-third.service | 15 +++++++++++++++ .../templates/init/openim-rpc-user.service | 15 +++++++++++++++ deployments/templates/openim-api.yaml | 3 +++ deployments/templates/openim-cmdutils.yaml | 3 +++ deployments/templates/openim-crontask.yaml | 4 +++- deployments/templates/openim-msggateway.yaml | 3 +++ deployments/templates/openim-msgtransfer.yaml | 3 +++ deployments/templates/openim-push.yaml | 3 +++ deployments/templates/openim-rpc-auth.yaml | 3 +++ .../templates/openim-rpc-conversation.yaml | 3 +++ deployments/templates/openim-rpc-friend.yaml | 3 +++ deployments/templates/openim-rpc-group.yaml | 3 +++ deployments/templates/openim-rpc-msg.yaml | 3 +++ deployments/templates/openim-rpc-third.yaml | 3 +++ deployments/templates/openim-rpc-user.yaml | 3 +++ 26 files changed, 210 insertions(+), 6 deletions(-) create mode 100644 deployments/templates/init/openim-cmdutils.service create mode 100644 deployments/templates/init/openim-msggateway.service create mode 100644 deployments/templates/init/openim-msgtransfer.service create mode 100644 deployments/templates/init/openim-push.service create mode 100644 deployments/templates/init/openim-rpc-auth.service create mode 100644 deployments/templates/init/openim-rpc-conversation.service create mode 100644 deployments/templates/init/openim-rpc-friend.service create mode 100644 deployments/templates/init/openim-rpc-group.service create mode 100644 deployments/templates/init/openim-rpc-msg.service create mode 100644 deployments/templates/init/openim-rpc-third.service create mode 100644 deployments/templates/init/openim-rpc-user.service create mode 100644 deployments/templates/openim-api.yaml create mode 100644 deployments/templates/openim-cmdutils.yaml create mode 100644 deployments/templates/openim-msggateway.yaml create mode 100644 deployments/templates/openim-msgtransfer.yaml create mode 100644 deployments/templates/openim-push.yaml create mode 100644 deployments/templates/openim-rpc-auth.yaml create mode 100644 deployments/templates/openim-rpc-conversation.yaml create mode 100644 deployments/templates/openim-rpc-friend.yaml create mode 100644 deployments/templates/openim-rpc-group.yaml create mode 100644 deployments/templates/openim-rpc-msg.yaml create mode 100644 deployments/templates/openim-rpc-third.yaml create mode 100644 deployments/templates/openim-rpc-user.yaml diff --git a/deployments/templates/init/openim-api.service b/deployments/templates/init/openim-api.service index 46303cb08..af1fb477d 100644 --- a/deployments/templates/init/openim-api.service +++ b/deployments/templates/init/openim-api.service @@ -1,14 +1,15 @@ [Unit] -Description=OpenIM Server API -Documentation=https://github.com/marmotedu/iam/blob/master/init/README.md +Description=OPENIM OPENIM API +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md [Service] WorkingDirectory=${OPENIM_DATA_DIR}/openim-api -ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-api --apiconfig=${OPENIM_CONFIG_DIR}/openim-api.yaml +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-api +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-api --config=${OPENIM_CONFIG_DIR}/openim-api.yaml Restart=always RestartSec=5 StartLimitInterval=0 [Install] WantedBy=multi-user.target -EOF \ No newline at end of file diff --git a/deployments/templates/init/openim-cmdutils.service b/deployments/templates/init/openim-cmdutils.service new file mode 100644 index 000000000..b039b80a9 --- /dev/null +++ b/deployments/templates/init/openim-cmdutils.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM CMDUTILS +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-cmdutils +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-cmdutils +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-cmdutils --config=${OPENIM_CONFIG_DIR}/openim-cmdutils.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-crontask.service b/deployments/templates/init/openim-crontask.service index 930f7c450..861ba1d20 100644 --- a/deployments/templates/init/openim-crontask.service +++ b/deployments/templates/init/openim-crontask.service @@ -1,5 +1,5 @@ [Unit] -Description=OPENIM CRONTASK +Description=OPENIM OPENIM CRONTASK Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md [Service] diff --git a/deployments/templates/init/openim-msggateway.service b/deployments/templates/init/openim-msggateway.service new file mode 100644 index 000000000..4e280dd86 --- /dev/null +++ b/deployments/templates/init/openim-msggateway.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM MSGGATEWAY +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-msggateway +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-msggateway +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-msggateway --config=${OPENIM_CONFIG_DIR}/openim-msggateway.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-msgtransfer.service b/deployments/templates/init/openim-msgtransfer.service new file mode 100644 index 000000000..bd805a0ba --- /dev/null +++ b/deployments/templates/init/openim-msgtransfer.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM MSGTRANSFER +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-msgtransfer +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-msgtransfer +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-msgtransfer --config=${OPENIM_CONFIG_DIR}/openim-msgtransfer.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-push.service b/deployments/templates/init/openim-push.service new file mode 100644 index 000000000..f3e5a2d42 --- /dev/null +++ b/deployments/templates/init/openim-push.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM PUSH +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-push +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-push +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-push --config=${OPENIM_CONFIG_DIR}/openim-push.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-rpc-auth.service b/deployments/templates/init/openim-rpc-auth.service new file mode 100644 index 000000000..15671602a --- /dev/null +++ b/deployments/templates/init/openim-rpc-auth.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM RPC AUTH +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-rpc-auth +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-rpc-auth +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-rpc-auth --config=${OPENIM_CONFIG_DIR}/openim-rpc-auth.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-rpc-conversation.service b/deployments/templates/init/openim-rpc-conversation.service new file mode 100644 index 000000000..bd4918231 --- /dev/null +++ b/deployments/templates/init/openim-rpc-conversation.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM RPC CONVERSATION +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-rpc-conversation +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-rpc-conversation +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-rpc-conversation --config=${OPENIM_CONFIG_DIR}/openim-rpc-conversation.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-rpc-friend.service b/deployments/templates/init/openim-rpc-friend.service new file mode 100644 index 000000000..d8a675d92 --- /dev/null +++ b/deployments/templates/init/openim-rpc-friend.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM RPC FRIEND +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-rpc-friend +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-rpc-friend +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-rpc-friend --config=${OPENIM_CONFIG_DIR}/openim-rpc-friend.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-rpc-group.service b/deployments/templates/init/openim-rpc-group.service new file mode 100644 index 000000000..4a5fdca2a --- /dev/null +++ b/deployments/templates/init/openim-rpc-group.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM RPC GROUP +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-rpc-group +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-rpc-group +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-rpc-group --config=${OPENIM_CONFIG_DIR}/openim-rpc-group.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-rpc-msg.service b/deployments/templates/init/openim-rpc-msg.service new file mode 100644 index 000000000..dc505f407 --- /dev/null +++ b/deployments/templates/init/openim-rpc-msg.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM RPC MSG +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-rpc-msg +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-rpc-msg +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-rpc-msg --config=${OPENIM_CONFIG_DIR}/openim-rpc-msg.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-rpc-third.service b/deployments/templates/init/openim-rpc-third.service new file mode 100644 index 000000000..60639f775 --- /dev/null +++ b/deployments/templates/init/openim-rpc-third.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM RPC THIRD +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-rpc-third +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-rpc-third +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-rpc-third --config=${OPENIM_CONFIG_DIR}/openim-rpc-third.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/init/openim-rpc-user.service b/deployments/templates/init/openim-rpc-user.service new file mode 100644 index 000000000..17afb8bda --- /dev/null +++ b/deployments/templates/init/openim-rpc-user.service @@ -0,0 +1,15 @@ +[Unit] +Description=OPENIM OPENIM RPC USER +Documentation=https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployment/init/README.md + +[Service] +WorkingDirectory=${OPENIM_DATA_DIR}/openim-rpc-user +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_DATA_DIR}/openim-rpc-user +ExecStartPre=/usr/bin/mkdir -p ${OPENIM_LOG_DIR} +ExecStart=${OPENIM_INSTALL_DIR}/bin/openim-rpc-user --config=${OPENIM_CONFIG_DIR}/openim-rpc-user.yaml +Restart=always +RestartSec=5 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target diff --git a/deployments/templates/openim-api.yaml b/deployments/templates/openim-api.yaml new file mode 100644 index 000000000..31b756078 --- /dev/null +++ b/deployments/templates/openim-api.yaml @@ -0,0 +1,3 @@ +name: openim-api +description: "This is a description for openim-api" +type: "service" diff --git a/deployments/templates/openim-cmdutils.yaml b/deployments/templates/openim-cmdutils.yaml new file mode 100644 index 000000000..4e9bf4af3 --- /dev/null +++ b/deployments/templates/openim-cmdutils.yaml @@ -0,0 +1,3 @@ +name: openim-cmdutils +description: "This is a description for openim-cmdutils" +type: "service" diff --git a/deployments/templates/openim-crontask.yaml b/deployments/templates/openim-crontask.yaml index bc6221b67..04f745e92 100644 --- a/deployments/templates/openim-crontask.yaml +++ b/deployments/templates/openim-crontask.yaml @@ -1 +1,3 @@ -# OpenIM Cronstask \ No newline at end of file +name: openim-crontask +description: "This is a description for openim-crontask" +type: "service" diff --git a/deployments/templates/openim-msggateway.yaml b/deployments/templates/openim-msggateway.yaml new file mode 100644 index 000000000..071c2397b --- /dev/null +++ b/deployments/templates/openim-msggateway.yaml @@ -0,0 +1,3 @@ +name: openim-msggateway +description: "This is a description for openim-msggateway" +type: "service" diff --git a/deployments/templates/openim-msgtransfer.yaml b/deployments/templates/openim-msgtransfer.yaml new file mode 100644 index 000000000..d6b30c30a --- /dev/null +++ b/deployments/templates/openim-msgtransfer.yaml @@ -0,0 +1,3 @@ +name: openim-msgtransfer +description: "This is a description for openim-msgtransfer" +type: "service" diff --git a/deployments/templates/openim-push.yaml b/deployments/templates/openim-push.yaml new file mode 100644 index 000000000..911a01437 --- /dev/null +++ b/deployments/templates/openim-push.yaml @@ -0,0 +1,3 @@ +name: openim-push +description: "This is a description for openim-push" +type: "service" diff --git a/deployments/templates/openim-rpc-auth.yaml b/deployments/templates/openim-rpc-auth.yaml new file mode 100644 index 000000000..bb43ed233 --- /dev/null +++ b/deployments/templates/openim-rpc-auth.yaml @@ -0,0 +1,3 @@ +name: openim-rpc-auth +description: "This is a description for openim-rpc-auth" +type: "service" diff --git a/deployments/templates/openim-rpc-conversation.yaml b/deployments/templates/openim-rpc-conversation.yaml new file mode 100644 index 000000000..b71520ec8 --- /dev/null +++ b/deployments/templates/openim-rpc-conversation.yaml @@ -0,0 +1,3 @@ +name: openim-rpc-conversation +description: "This is a description for openim-rpc-conversation" +type: "service" diff --git a/deployments/templates/openim-rpc-friend.yaml b/deployments/templates/openim-rpc-friend.yaml new file mode 100644 index 000000000..b8a7e6641 --- /dev/null +++ b/deployments/templates/openim-rpc-friend.yaml @@ -0,0 +1,3 @@ +name: openim-rpc-friend +description: "This is a description for openim-rpc-friend" +type: "service" diff --git a/deployments/templates/openim-rpc-group.yaml b/deployments/templates/openim-rpc-group.yaml new file mode 100644 index 000000000..6f90ec493 --- /dev/null +++ b/deployments/templates/openim-rpc-group.yaml @@ -0,0 +1,3 @@ +name: openim-rpc-group +description: "This is a description for openim-rpc-group" +type: "service" diff --git a/deployments/templates/openim-rpc-msg.yaml b/deployments/templates/openim-rpc-msg.yaml new file mode 100644 index 000000000..9214871fb --- /dev/null +++ b/deployments/templates/openim-rpc-msg.yaml @@ -0,0 +1,3 @@ +name: openim-rpc-msg +description: "This is a description for openim-rpc-msg" +type: "service" diff --git a/deployments/templates/openim-rpc-third.yaml b/deployments/templates/openim-rpc-third.yaml new file mode 100644 index 000000000..5914a8bac --- /dev/null +++ b/deployments/templates/openim-rpc-third.yaml @@ -0,0 +1,3 @@ +name: openim-rpc-third +description: "This is a description for openim-rpc-third" +type: "service" diff --git a/deployments/templates/openim-rpc-user.yaml b/deployments/templates/openim-rpc-user.yaml new file mode 100644 index 000000000..a79084096 --- /dev/null +++ b/deployments/templates/openim-rpc-user.yaml @@ -0,0 +1,3 @@ +name: openim-rpc-user +description: "This is a description for openim-rpc-user" +type: "service"