Centos 7 Saltstack Automated Deployment WebLogic 12c

Source: Internet
Author: User
Tags saltstack

# pwd

/etc/salt/base


# Tree cluster/

cluster/

├──files

│├──CREAT.RSP-------------1

│├──startser01.sh--------------2

│└──startser02.sh-------------3

└──weblogic.sls--------------4


1.creat.rsp

Read template from "/home/weblogic/oracle/middleware/oracle_home/wlserver/common/templates/wls/wls.jar";

Set Javahome "/usr/java/jdk1.8.0_141";

Set Serverstartmode "Dev";

Find Server "AdminServer" as AdminServer;

Set Adminserver.listenaddress "";

Set Adminserver.listenport "7001";

Create Cluster "Cluster-0" as Clustername1;


Create Server "Server-1" as BASE;

Set BASE. ListenAddress "";

Set BASE. Listenport "8001";

Set Base.cluster "Cluster-0";


Create Server "Server-2" as BASE2;

Set BASE2. ListenAddress "";

Set BASE2. Listenport "8002";

Set Base.cluster "Cluster-0";


Find User "WebLogic" as WebLogic;

Set Weblogic.password "weblogic123";

Write domain to "/home/weblogic/domains/jydomains";

Close template;




2.startser01.sh


#!/bin/bash

Export user_mem_args= "-xms1024m-xmx2048m-xx:permsize=1024m"

pidb=$ (Ps-ef|grep java|grep ' WebLogic. Name=server-1 ' |awk ' {print $} ')

echo ' Kill ' $pidb

Kill-9 $pidb 1>/dev/null

Sleep 5

Domains=/home/weblogic/domains/jydomains

CD $domains

./bin/startmanagedweblogic.sh Server-1 http://IP:7001 1> $domains/servers/server-1/logs/server-1.log 2>$ Domains/servers/server-1/logs/server-1-stderr.log &


3.startser02.sh

#!/bin/bash

Export user_mem_args= "-xms1024m-xmx2048m-xx:permsize=1024m"

pidb=$ (Ps-ef|grep java|grep ' WebLogic. Name=server-2 ' |awk ' {print $} ')

echo ' Kill ' $pidb

Kill-9 $pidb 1>/dev/null

Sleep 5

Domains=/home/weblogic/domains/jydomains

CD $domains

./bin/startmanagedweblogic.sh Server-2 http://IP:7001 1> $domains/servers/server-2/logs/server-2.log 2>$ Domains/servers/server-2/logs/server-2-stderr.log &



4.weblogic.sls

Include

-Weblogic.install



StartSer01:

File.managed:

-Name:/home/weblogic/domains/jydomains/startser01.sh

-source:salt://cluster/files/startser01.sh

-User:weblogic

-Group:weblogic

-mode:755


StartSer02:

File.managed:

-Name:/home/weblogic/domains/jydomains/startser02.sh

-source:salt://cluster/files/startser02.sh

-User:weblogic

-Group:weblogic

-mode:755


Weblogic-service:

File.managed:

-Name:/TMP/CREAT.RSP

-SOURCE:SALT://CLUSTER/FILES/CREAT.RSP

-User:weblogic

-Group:weblogic

-mode:755


Cmd.run:

-Name:export config_jvm_args= '-djava.security.egd=file:/dev/urandom ' &&/home/weblogic/oracle/middleware/ ORACLE_HOME/WLSERVER/COMMON/BIN/CONFIG.SH-MODE=SILENT-SILENT_SCRIPT=/TMP/CREAT.RSP &

-User:weblogic




# Tree weblogic/

weblogic/

├──files

│├──fmw_12.2.1.2.0_infrastructure.jar-----------1

│├──FMW_12.2.1.2.0_INFRASTRUCTURE.RSP-----------2

│├──jdk-8u141-linux-x64.rpm-----------3

│└──orainst.loc----------4

└──install.sls---------5



1.fmw_12.2.1.2.0_infrastructure.jar

2.fmw_12.2.1.2.0_infrastructure.rsp

[ENGINE]

Response File version=1.0.0.0.0

[GENERIC]

Decline_auto_updates=true

Mos_username=

Mos_password=<secure value>

auto_updates_location=

Software_updates_proxy_server=

software_updates_proxy_port=

Software_updates_proxy_user=

Software_updates_proxy_password=<secure value>

Oracle_home=/home/weblogic/oracle/middleware/oracle_home

Install_type=fusion Middleware Infrastructure

Myoraclesupport_username=

Myoraclesupport_password=<secure value>

Decline_security_updates=true

Security_updates_via_myoraclesupport=false

proxy_host=

proxy_port=

Proxy_user=

Proxy_pwd=<secure value>

Collector_supporthub_url=



3.jdk-8u141-linux-x64.rpm


4.orainst.loc

Inventory_loc=/home/weblogic/orainventory

Inst_group=weblogic


5.install.sls


Include

-Pkg.jdk-init


Weblogic:

Group.present:

-Name:weblogic

-gid:2000

User.present:

-Fullname:weblogic

-Shell:/bin/bash

-Password: ' pa$ $w 0rd '

-Home:/home/weblogic

-uid:2000

-gid:2000


/tmp/orainst.loc:

File.managed:

-Source:salt://weblogic/files/orainst.loc

-mode:755

-User:weblogic

-Group:weblogic


/TMP/FMW_12.2.1.2.0_INFRASTRUCTURE.RSP:

File.managed:

-SOURCE:SALT://WEBLOGIC/FILES/FMW_12.2.1.2.0_INFRASTRUCTURE.RSP

-mode:755

-User:weblogic

-Group:weblogic


Weblogic-install:

File.managed:

-Name:/tmp/fmw_12.2.1.2.0_infrastructure.jar

-Source:salt://weblogic/files/fmw_12.2.1.2.0_infrastructure.jar

-mode:755

-User:weblogic

-Group:weblogic


Cmd.run:

-Name:/usr/java/jdk1.8.0_141/bin/java-jar/tmp/fmw_12.2.1.2.0_infrastructure.jar-silent-responsefile/tmp/fmw_ 12.2.1.2.0_infrastructure.rsp-invptrloc/tmp/orainst.loc &

-User:weblogic

-Require:

-File:weblogic-install


This article is from the "Operational Growth Road" blog, please be sure to keep this source http://pankuo.blog.51cto.com/8651697/1982971

Centos 7 Saltstack Automated Deployment WebLogic 12c

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.