How to configure JBoosFuse Fabric in Centos and RHEL Server

========================================================================
[root@Centos6 ~]# vim /etc/hosts (edit in All Nodes for Name Resolution)
172.16.201.200  node1.example.com node1
172.16.201.201  node2.example.com node2
172.16.201.202  node3.example.com node3
172.16.201.203  nfs.example.com nfs

Stop All Firewall and selinux policy ( on All Nodes)

[root@nfs ~]# iptables -F
[root@nfs ~]# iptables -F -t nat
[root@nfs ~]# /etc/init.d/iptables save
[root@nfs ~]# /etc/init.d/iptables stop
[root@nfs ~]# chkconfig iptables off
[root@nfs ~]# vim /etc/sysconfig/selinux
SELINUX=enforcing [TO]  SELINUX=disabled
[root@nfs ~]# init 6
========================================================================

Create NFS For shareing Maven
[root@nfs ~]# mkdir /opt/MAVEN
[root@nfs ~]# chmod -R 777 /opt/MAVEN
[root@nfs ~]# vim /etc/exports
/opt/MAVEN    172.16.201.0/16(rw,sync)
[root@nfs ~]# /etc/init.d/nfs restart

========================================================================
Download Maven zip  ( do for all Nodes except NFS )
[root@Centos6 ~]# wget -c  http://www-eu.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.zip
[root@Centos6 ~]# cp apache-maven-3.5.2-bin.zip /opt/
[root@Centos6 ~]# cd /opt/
[root@Centos6 opt ]# unzip apache-maven-3.5.2-bin.zip  
[root@Centos6 opt ]# mv apache-maven-3.5.2-bin apache-maven
[root@Centos6 opt ]# vim apache-maven/conf/settings.xml
  <localRepository>/opt/MAVEN/</localRepository>

[root@Centos6 opt ]# mkdir /opt/MAVEN
[root@Centos6 opt ]# mount 172.16.201.203:/opt/MAVEN  /opt/MAVEN
 
[root@Centos6 opt ]# vim /etc/profile.d/maven.sh
export M2_HOME=/opt/apache-maven
export M2=$M2_HOME/bin
PATH=$M2:$PATH
[root@Centos6 opt ]# sh /etc/profile.d/maven.sh
[root@Centos6 opt ]# source /etc/profile.d/maven.sh
[root@Centos6 opt ]# mv
mv        mvn       mvnDebug  mvnyjp

Install and set JAVA_HOME Path
[root@Centos6 ~]# echo $JAVA_HOME
/usr/jdk1.8.0_73

[root@Centos6 ~]# useradd fuse
[root@Centos6 ~]# passwd fuse

Download Jboss fuse tar 

[root@Centos6 ~]# mv jboss-fuse-6.2.0.redhat-133.zip  /opt
[root@Centos6 ~]# cd /opt
[root@Centos6 opt]# unzip jboss-fuse-6.2.0.redhat-133.zip
[root@Centos6 opt]# mv jboss-fuse-6.2.0.redhat-133 JBOSSFUSE
[root@Centos6 opt]# chown -R fuse:fuse JBOSSFUSE
[root@Centos6 opt]# su - fuse
[fuse@Centos6 ~]$ cd /opt
[fuse@Centos6 opt]$ vim JBOSSFUSE/etc/system.properties
karaf.name = root [TO] karaf.name = node1

[fuse@Centos6 opt]$ vim JBOSSFUSE/etc/org.apache.karaf.management.cfg
rmiRegistryHost = 0.0.0.0 [TO] rmiRegistryHost = node1.example.com
rmiServerHost = 0.0.0.0 [TO] rmiServerHost = node1.example.com

[fuse@Centos6 opt]$ vim JBOSSFUSE/etc/users.properties
# admin=admin,admin,manager,viewer,Monitor, Operator, Maintainer, Deployer, Auditor, Administrator, SuperUser
[TO]
admin=admin,admin,manager,viewer,Monitor, Operator, Maintainer, Deployer, Auditor, Administrator, SuperUser

[fuse@Centos6 opt]$ cd JBOSSFUSE/bin
[fuse@Centos6 opt]$ ./start
[fuse@Centos6 opt]$ ssh admin@localhost -p8101
Password authentication
Password:
      _ ____                  ______
     | |  _ \                |  ____|            
     | | |_) | ___  ___ ___  | |__ _   _ ___  ___
 _   | |  _ < / _ \/ __/ __| |  __| | | / __|/ _ \
| |__| | |_) | (_) \__ \__ \ | |  | |_| \__ \  __/
 \____/|____/ \___/|___/___/ |_|   \__,_|___/\___|

  JBoss Fuse (6.2.1.redhat-084)
  http://www.redhat.com/products/jbossenterprisemiddleware/fuse/

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.

Open a browser to http://localhost:8181 to access the management console

Create a new Fabric via 'fabric:create'
or join an existing Fabric via 'fabric:join [someUrls]'

Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown JBoss Fuse.

JBossFuse:admin@node1> config:edit org.ops4j.pax.url.mvn
JBossFuse:admin@node1> config:propset org.ops4j.pax.url.mvn.localRepository file:/opt/MAVEN/
JBossFuse:admin@node1> config:update
========================================================================

Create Fabric on Node1
JBossFuse:admin@node1> fabric:create --new-user admin --new-user-password admin --new-user-role Administrator --zookeeper-password admin --resolver \
manualip --manual-ip node1.example.com --wait-for-provisioning

join Febric on Node2 and Node3
JBossFuse:admin@node2> fabric:join --zookeeper-password admin --resolver manualip --manual-ip node2.example.com  node1.example.com:2181
JBossFuse:admin@node3> fabric:join --zookeeper-password admin --resolver manualip --manual-ip node3.example.com  node1.example.com:2181

JBossFuse:admin@node1> container-list
[id]    [version]  [type]  [connected]  [profiles]              [provision status]
node1*  1.0        karaf   yes          fabric                  success          
                                        fabric-ensemble-0000-1                  
                                        jboss-fuse-full                          
node2   1.0        karaf   yes          fabric                  success          
node3   1.0        karaf   yes          fabric                  success          


JBossFuse:admin@node1> container-create-child --jvm-opts "-Xms512m -Xmx512m" node1 node1_child1
The following containers have been created successfully:
        Container: node1_child1.
JBossFuse:admin@node1> container-create-child --jvm-opts "-Xms512m -Xmx512m" node1 node1_child2
The following containers have been created successfully:
        Container: node1_child2.
JBossFuse:admin@node1> container-create-child --jvm-opts "-Xms512m -Xmx512m" node2 node2_child1
The following containers have been created successfully:
        Container: node2_child1.
JBossFuse:admin@node1> container-create-child --jvm-opts "-Xms512m -Xmx512m" node2 node2_child2
The following containers have been created successfully:
        Container: node2_child2.
JBossFuse:admin@node1> container-create-child --jvm-opts "-Xms512m -Xmx512m" node3 node3_child1
The following containers have been created successfully:
        Container: node3_child1.
JBossFuse:admin@node1> container-create-child --jvm-opts "-Xms512m -Xmx512m" node3 node3_child2
The following containers have been created successfully:
        Container: node3_child2.
JBossFuse:admin@node1> container-list
[id]            [version]  [type]  [connected]  [profiles]              [provision status]
node1*          1.0        karaf   yes          fabric                  success          
                                                fabric-ensemble-0000-1                  
                                                jboss-fuse-full                          
  node1_child1  1.0        karaf   yes          default                 success          
  node1_child2  1.0        karaf   yes          default                 success          
node2           1.0        karaf   yes          fabric                  success          
  node2_child1  1.0        karaf   yes          default                 success          
  node2_child2  1.0        karaf   yes          default                 success          
node3           1.0        karaf   yes          fabric                  success          
  node3_child1  1.0        karaf   yes          default                 success          
  node3_child2  1.0        karaf   yes          default                 success


Fabric Commands for Help
container-list (List For All Container)
container-connect node1_child1  (Login in to Child)
container-stop node1_child1  (Stop Child container)
container-start node1_child1  (Start Child container)
container-add-profile node1_child1 testProfile (Add Profile in Child Container)
container-remove-profile node1_child1 testProfile (remove Profile in Child Container)
container-create-child --jvm-opts "-Xms512m -Xmx512m" node3 node3_child2  (Create Child container)
container-delete node1_child1  (remove Child container)
version-list  (List for all versions)
version-create 1.1  (Created New Version)
version-delete 1.1  ( remove any Version )
profile-create testProfile  (New Profile Creation)
profile-create --version 1.1 testProfile  (Create particular version Profile)
profile-delete testProfile  (remove any Profile )
profile-list  (List All Profiles)
profile-display testProfile  (Checking for any Profile)
profile-display  --version 1.1 testProfile  (Checking for particular version Profile)
profile-refresh testProfile  (refresh for any Profile )
profile-edit --feature camel-blueprint testProfile  (Add feature in Profile)
profile-edit --bundle  mvn:in.goindigo.raju/Raju/1.0.0 testProfile  (Add bundle in Profile)
profile-edit --pid  in.ashish/PID_NAME=VELUE  testProfile  (Add pid in Profile)
profile-edit --delete --feature camel-blueprint testProfile (remove feature in Profile)
profile-edit --delete --bundle  mvn:in.goindigo.raju/Raju/1.0.0 testProfile  (remove bundle in Profile)
profile-edit --delete --pid  in.ashish/PID_NAME=VELUE  testProfile  (remove pid in Profile)

Comments

Post a Comment

Popular posts from this blog

PCS Corosync Pacemaker Cluster Mariadb using NFS

How to install and configure node js and PM2 in rhel7

How to Create or Configure iSCSI Server and Clinet