masatana opened a new pull request, #1295:
URL: https://github.com/apache/bigtop/pull/1295

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/BIGTOP/How+to+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'BIGTOP-3638: Your PR title ...'.
   -->
   
   ### Description of PR
   Provide systemd service unit files(RPM): ZooKeeper
   
   ### How was this patch tested?
   
   * Built & tested with smoke-test
   
   ```
   $ ./gradlew allclean zookeeper-pkg-ind repo-ind -POS=rockylinux-8
   $ cd provisioner/docker/
   $ ./docker-hadoop.sh --enable-local-repo \
       --disable-gpg-check \
       --docker-compose-plugin \
       -C config_rockylinux-8.yaml \
       -F docker-compose-cgroupv2.yml \
       --stack zookeeper \
       -c 1 --smoke-tests zookeeper
   ```
   
   * Check if the prepared systemd-unit file is used.
   
   ```
   $ docker ps
   CONTAINER ID   IMAGE                              COMMAND        CREATED     
         STATUS              PORTS     NAMES
   51a0f314387d   bigtop/puppet:trunk-rockylinux-8   "/sbin/init"   About a 
minute ago   Up About a minute             20240913_115924_r18302-bigtop-1
   ```
   
   ```
   $ docker exec -it 51a0f314387d systemctl cat zookeeper-server
   # /usr/lib/systemd/system/zookeeper-server.service
   # Licensed to the Apache Software Foundation (ASF) under one or more
   # contributor license agreements.  See the NOTICE file distributed with
   # this work for additional information regarding copyright ownership.
   # The ASF licenses this file to You under the Apache License, Version 2.0
   # (the "License"); you may not use this file except in compliance with
   # the License.  You may obtain a copy of the License at
   #
   #     http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing, software
   # distributed under the License is distributed on an "AS IS" BASIS,
   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   # See the License for the specific language governing permissions and
   # limitations under the License.
   
   [Unit]
   Documentation=https://zookeeper.apache.org/
   Description=ZooKeeper is a centralized service for maintaining configuration 
information, naming, providing distributed synchronization, and providing group 
services.
   Before=multi-user.target
   Before=graphical.target
   After=network-online.target
   After=nss-lookup.target
   Wants=network-online.target
   
   [Service]
   Type=forking
   Restart=no
   TimeoutSec=5min
   IgnoreSIGPIPE=no
   KillMode=process
   GuessMainPID=no
   RemainAfterExit=no
   PIDFile=/var/run/zookeeper/zookeeper_server.pid
   SuccessExitStatus=5 6
   ExecStart=/etc/rc.d/init.d/zookeeper-server start
   ExecStop=/etc/rc.d/init.d/zookeeper-server stop
   
   ```
   
   ### For code changes:
   
   - [x] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'BIGTOP-3638. Your PR title ...')?
   - [x] Make sure that newly added files do not have any licensing issues. 
When in doubt refer to https://www.apache.org/licenses/


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to