페이지 트리

이 페이지는 Wildfly Maven plugin과 Jenkins를 이용해 JBoss 용 웹 애플리케이션을 자동으로 빌드하고 배포하는 방법을 기술한다. JBoss는 Redhat 사의 WAS 이고 무료 제품인 community version과 상용 제품인 enterprise로 구성된다.

JBoss Overview

JBoss 설치 및 설정

JBoss 관리는 command line console과 Web console로 접근 가능

참고 문서 =https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/getting_started_guide/administering_jboss_eap#jboss_eap_installation_overview

운영 모드 (Operating modes)

JBoss는 두 가지 모드로 운영할 수 있다. 본 문서는 standalone mode를 기준으로 작성되었다.

  • Standalone Server: 하나의 독립적인 프로세스로 실행됨
  • Managed Domain: 여러개의 서버로 구성되며 중앙에서 관리할 수 있음

원격 접속 설정

JBoss는 로컬에서 접근하는 것이 기본이므로 원격 PC에서 관리하려면 설정이 필요함


설정파일

<install-directory>/bin/jboss-cli.sh --connect --command=:reload

포트 목록 및 변경


<install-directory>/standalone/configuration/standalone.xml
    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
        <socket-binding name="http" port="${jboss.http.port:8080}"/>
        <socket-binding name="https" port="${jboss.https.port:8443}"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

서비스 모드 실행 설정

TBD

original site = https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Installation_Guide/Install_JBoss_Enterprise_Application_Platform_6_Red_Hat_Enterprise_Linux_Service.html

3.9.2. Configure JBoss EAP 6 as a Service in Red Hat Enterprise Linux (Zip, Installer)

Summary
Use the following procedure to install JBoss EAP 6 as a service on Red Hat Enterprise Linux when the installation has been done with either the zip, text, or graphical methods. This process does not apply when the installation has been done using the RHN (RPM) method.

Prerequisites

Procedure 3.17. Setup the Service

  1. Locate the start-up script and configuration file

    The start-up script and an associated configuration file are located in the EAP_HOME/bin/init.d/ directory. Open the configuration file jboss-as.conf to edit it.
  2. Customize the start-up options in the jboss-as.conf file

    There are several options within the jboss-as.conf file. At the minimum, specify the correct values for JBOSS_HOME and the JBOSS_USER variables. If these variables are absent, add them.
  3. Copy files into system directories

    1. Copy the modified configuration file to the /etc/jboss-as directory.
      [user@host init.d]$ sudo mkdir /etc/jboss-as
      [user@host init.d]$ sudo cp jboss-as.conf /etc/jboss-as/
    2. Copy the start-up script to the /etc/init.d directory.
      [user@host init.d]$ sudo cp jboss-as-standalone.sh /etc/init.d
  4. Add the start-up script as a service.

    Add the new jboss-as-standalone.sh service to list of automatically started services, using the chkconfig service management command.
    [user@host init.d]$ sudo chkconfig --add jboss-as-standalone.sh
  5. Start the service.

    Test that the service has been installed correctly by using the standard syntax for starting Red Hat Enterprise Linux services.
    [user@host bin]$ sudo service jboss-as-standalone.sh start
    If everything has gone correctly, you should get a green [OK]. If you get an error, check the error logs and make sure your paths are correct in the configuration file.
  6. Make the service start automatically when you restart your server.

    To add the service to the list of services which start automatically when your server restarts, issue the following command.
    [root@host ~]# chkconfig jboss-as-standalone.sh on
    The service will now be started when your server reaches run-level 3, and will be stopped when your server is shut down or restarted.

실행

# > <install-directory>/bin/standalone.sh

애플리케이션 빌드 및 배포

이 절은 JBoss 용 애플리케이션을 빌드하고 배포하는 방법을 정리한다. 이 문서는 Maven 프로젝트를 기준으로 설명한다.

Maven 프로젝트의 경우 Wildfly 플러그인을 이용해 배포한다.

배포

# > mvn install wildfly:deploy -Dname=admin -Dpassword=password

배포취소

# > mvn wildfly:undeploy -Dname=admin -Dpassword=password
  • 레이블 없음