Simplest Enterprise Continuous Integration Solutions
Showing posts with label Software Configuration Management. Show all posts
Showing posts with label Software Configuration Management. Show all posts

Saturday, April 30, 2016

Software Development: Practice Jenkins Pipeline as Code

Practice Jenkins Pipeline as Code with Git flow, JFrog Artifactory, Azure Container Registry, GCP Container Registry.

RELEASE build (master, release branches)



PRIVATE build (feature, bugfix. hotfix branches)



Jenkinsfile (Jenkins Pipeline as Code) Development 


Saturday, October 3, 2015

Software Development: Git flow overview





Permanent branches

master - the integration branch used for development. Feature branches are merged back into this branch
production - support preparation of a new production release (allow for minor bug fixes)

Temporary branches

features - used for specific feature work. Typically, this branches from and merges back into the development branch
releases - used for release tasks and long-term maintenance. Typically, this branches from the development branch and changes are merged back into the development branch
hotfixes - typically used to quickly fix the production branch

Sunday, April 19, 2015

Saturday, September 13, 2014

Docker: image, repository and registry

Docker Registry (version 1.0)

# OS version, docker engine version

[root@docker-registry-server ~]# uname -a
Linux docker-registry-server 2.6.32-504.16.2.el6.x86_64 #1 SMP Tue Apr 21 08:37:59 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@docker-registry-server ~]# docker -v
Docker version 1.6.2, build 7c8fca2
[root@docker-registry-server ~]# service docker status
docker (pid  1410) is running...


# docker registry IP address

[root@docker-registry-server ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:56:92:6F:78
          inet addr:10.3.22.191  Bcast:10.3.23.255  Mask:255.255.252.0


# docker daemon process with argument

[root@docker-registry-server ~]# ps -ef | grep docker
root      3862     1  0 13:01 pts/2    00:00:00 /usr/bin/docker -d --insecure-registry 10.3.22.191:5000
root      3918  2963  0 13:01 pts/0    00:00:00 docker run -p 5000:5000 registry
root      3956  3862  0 13:01 pts/2    00:00:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 5000 -container-ip 172.17.0.1 -container-port 5000
root      3968  3862  0 13:01 ?        00:00:00 /usr/bin/python /usr/local/bin/gunicorn --access-logfile - --error-logfile - --max-requests 100 -k gevent --graceful-timeout 3600 -t 3600 -w 4 -b 0.0.0.0:5000 --reload docker_registry.wsgi:application
root      4029  3968  1 13:01 ?        00:00:00 /usr/bin/python /usr/local/bin/gunicorn --access-logfile - --error-logfile - --max-requests 100 -k gevent --graceful-timeout 3600 -t 3600 -w 4 -b 0.0.0.0:5000 --reload docker_registry.wsgi:application
root      4030  3968  1 13:01 ?        00:00:00 /usr/bin/python /usr/local/bin/gunicorn --access-logfile - --error-logfile - --max-requests 100 -k gevent --graceful-timeout 3600 -t 3600 -w 4 -b 0.0.0.0:5000 --reload docker_registry.wsgi:application
root      4031  3968  1 13:01 ?        00:00:00 /usr/bin/python /usr/local/bin/gunicorn --access-logfile - --error-logfile - --max-requests 100 -k gevent --graceful-timeout 3600 -t 3600 -w 4 -b 0.0.0.0:5000 --reload docker_registry.wsgi:application
root      4032  3968  1 13:01 ?        00:00:00 /usr/bin/python /usr/local/bin/gunicorn --access-logfile - --error-logfile - --max-requests 100 -k gevent --graceful-timeout 3600 -t 3600 -w 4 -b 0.0.0.0:5000 --reload docker_registry.wsgi:application
root      4050  2899  0 13:03 pts/2    00:00:00 grep docker


[root@docker-registry-server ~]# curl 10.3.22.191:5000
"\"docker-registry server\""[root@docker-registry-server ~]#

# docker build image myimage-app:v1 from Dockerfile

[root@docker-registry-server ~]# cd /tmp/myimage-app
[root@docker-registry-server myimage-app]# cat Dockerfile
# Set the base image to Centos
FROM centos

# File Author / Maintainer
MAINTAINER BuildMaster <buildmaster@qxc.com>

# install RPM package
RUN rpm -Uvh myiamge-app-package-1.0.0-20140524.noarch.rpm
[root@docker-registry-server myimage-app]# docker build -t myimage-app:v1 .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon
Step 0 : FROM centos
---> fd44297e2ddb
Step 1 : MAINTAINER BuildMaster <buildmaster@qxc.com>
---> Using cache
---> 4eb21a2527e9
Step 2 : RUN rpm -Uvh myimage-app-package-1.0.0-20140524.noarch.rpm
---> Running in 701420d2d28a
Retrieving myimage-app-package-1.0.0-20140524.noarch.rpm
Preparing...                          ########################################
Updating / installing...
myimage-app-package-1.0.0-20140524########################################
---> d124c70feeee
Removing intermediate container 701420d2d28a
Successfully built d124c70feeee

[root@docker-registry-server ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
myimage-app            v1                  d124c70feeee        41 seconds ago      226.3 MB
registry            latest              204704ce3137        11 days ago         413.8 MB
jenkins             latest              1520f72eb8b6        3 weeks ago         662 MB
centos              latest              fd44297e2ddb        4 weeks ago         215.7 MB


# docker tag for private docker registry

[root@docker-registry-server ~]# docker tag myimage-app:v1 10.3.22.191:5000/myimage
[root@docker-registry-server ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
myimage-app                v1                  d124c70feeee        2 hours ago         226.3 MB
10.3.22.191:5000/myimage   latest              d124c70feeee        2 hours ago         226.3 MB
registry                latest              204704ce3137        11 days ago         413.8 MB
jenkins                 latest              1520f72eb8b6        3 weeks ago         662 MB
centos                  latest              fd44297e2ddb        4 weeks ago         215.7 MB


# docker push to private docker registry

[root@docker-registry-server ~]# docker push 10.3.22.191:5000/myimage
The push refers to a repository [10.3.22.191:5000/myimage] (len: 1)
Sending image list
Pushing repository 10.3.22.191:5000/myimage (1 tags)
6941bfcbbfca: Image successfully pushed
41459f052977: Image successfully pushed
fd44297e2ddb: Image successfully pushed
4eb21a2527e9: Image successfully pushed
d124c70feeee: Image successfully pushed
Pushing tag for rev [d124c70feeee] on {http://10.3.22.191:5000/v1/repositories/myimage/tags/latest}
[root@docker-registry-server ~]# curl http://10.3.22.191:5000/v1/repositories/myimage/tags/latest
"d124c70feeee098660422e98a515c0eabe20f9f93c6d28a593d294fcf302abb1"[root@docker-registry-server ~]#



Docker client (docker engine version could be previous version)

# OS version, docker engine version

[root@docker-client1 ~]# uname -a
Linux docker-client1 2.6.32-504.el6.x86_64 #1 SMP Tue Oct 14 01:47:47 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@docker-client1 ~]# docker -v
Docker version 1.5.0, build a8a31ef/1.5.0
[root@docker-client1 ~]# service docker status
docker (pid  27176) is running...


# docker client IP address

[root@docker-client1 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:77:1A:BB
          inet addr:10.3.23.142  Bcast:10.3.23.255  Mask:255.255.252.0


# docker daemon process with arguments

[root@docker-client1 ~]# ps -ef | grep docker
root     27176     1  0 23:18 pts/1    00:00:00 /usr/bin/docker -d --insecure-registry 10.3.22.191:5000
root     27326 27019  0 23:32 pts/1    00:00:00 grep docker

[root@docker-client1 ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
centos              latest              fd44297e2ddb        4 weeks ago         215.7 MB


# pull an image from remote private docker registry (version 1.0)

[root@docker-client1 ~]# docker pull 10.3.22.191:5000/myimage
Pulling repository 10.3.22.191:5000/myimage
d124c70feeee: Download complete
6941bfcbbfca: Download complete
41459f052977: Download complete
fd44297e2ddb: Download complete
4eb21a2527e9: Download complete
Status: Downloaded newer image for 10.3.22.191:5000/myimage:latest
[root@docker-client1 ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
10.3.22.191:5000/myimage   latest              d124c70feeee        8 hours ago         226.3 MB
centos                  latest              fd44297e2ddb        4 weeks ago         215.7 MB


# check container contents

[root@docker-client1 ~]# docker run -t -i 10.3.22.191:5000/myimage
[root@1f5c3796e479 /]# ls -al /tmp
total 28
drwxrwxrwt  7 root root 4096 May 25 23:34 .
drwxr-xr-x 17 root root 4096 May 25 23:34 ..
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .ICE-unix
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .Test-unix
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .X11-unix
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .XIM-unix
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .font-unix
[root@1f5c3796e479 /]# rpm -qa | grep myimage
DEV-myimage-app-package-1.0.0.37-20150522.noarch
[root@1f5c3796e479 /]# exit
exit


Docker Registry (version 2.0)

# OS version, docker engine version

[root@docker-registry-server ~]# uname -a
Linux docker-registry-server 2.6.32-504.16.2.el6.x86_64 #1 SMP Tue Apr 21 08:37:59 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@docker-registry-server ~]# docker -v
Docker version 1.6.2, build 7c8fca2
[root@docker-registry-server ~]# service docker status
docker (pid  3862) is running...


# docker daemon process and argument

[root@docker-registry-server ~]# ps -ef | grep docker
root      3862     1  7 13:01 pts/2    00:01:44 /usr/bin/docker -d --insecure-registry 10.3.22.191:5000
root      4217  2963  0 13:16 pts/0    00:00:00 docker run -p 5000:5000 registry:2.0 
root      4625  3862  0 13:17 pts/2    00:00:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 5000 -container-ip 172.17.0.2 -container-port 5000
root      5111  2899  0 13:23 pts/2    00:00:00 grep docker

[root@docker-registry-server ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
10.3.22.191:5000/myimage   latest              d124c70feeee        2 hours ago         226.3 MB
myimage-app                v1                  d124c70feeee        2 hours ago         226.3 MB
registry                2.0                 0ff65644861b        11 days ago         548.5 MB
registry                latest              204704ce3137        11 days ago         413.8 MB
jenkins                 latest              1520f72eb8b6        3 weeks ago         662 MB
centos                  latest              fd44297e2ddb        4 weeks ago         215.7 MB


# create a new image on a docker container

[root@docker-registry-server ~]# docker run -t -i myimage-app:v1
[root@4d0a41299372 /]# touch /tmp/aaa
[root@4d0a41299372 /]# exit
exit


# commit an image

[root@docker-registry-server ~]# docker commit -m "myimage:v2" 4d0a41299372 myimage:v2
1545e9605745217b70d0201b3768c8d364b7f5aa599525b9336d133bff2b6284
[root@docker-registry-server ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
myimage                    v2                  1545e9605745        15 seconds ago      226.3 MB
myimage-app                v1                  d124c70feeee        2 hours ago         226.3 MB
10.3.22.191:5000/myimage   latest              d124c70feeee        2 hours ago         226.3 MB
registry                2.0                 0ff65644861b        11 days ago         548.5 MB
registry                latest              204704ce3137        11 days ago         413.8 MB
jenkins                 latest              1520f72eb8b6        3 weeks ago         662 MB
centos                  latest              fd44297e2ddb        4 weeks ago         215.7 MB


# docker tag for private docker registry

[root@docker-registry-server ~]# docker tag -f myimage:v2 10.3.22.191:5000/myimage
[root@docker-registry-server ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED              VIRTUAL SIZE
10.3.22.191:5000/myimage   latest              1545e9605745        About a minute ago   226.3 MB
myimage                    v2                  1545e9605745        About a minute ago   226.3 MB
myimage-app                v1                  d124c70feeee        2 hours ago          226.3 MB
registry                2.0                 0ff65644861b        11 days ago          548.5 MB
registry                latest              204704ce3137        11 days ago          413.8 MB
jenkins                 latest              1520f72eb8b6        3 weeks ago          662 MB
centos                  latest              fd44297e2ddb        4 weeks ago          215.7 MB


# docker push to private docker registry

[root@docker-registry-server ~]# docker push 10.3.22.191:5000/myimage
The push refers to a repository [10.3.22.191:5000/myimage] (len: 1)
1545e9605745: Image already exists
d124c70feeee: Image successfully pushed
4eb21a2527e9: Image successfully pushed
fd44297e2ddb: Image successfully pushed
41459f052977: Image successfully pushed
6941bfcbbfca: Image successfully pushed
Digest: sha256:57d2e2ba8e4bef77ce22f922d126b2c4ace4bc882950609cfa75edd2a70d75af 
[root@docker-registry-server ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
myimage                    v2                  1545e9605745        3 minutes ago       226.3 MB
10.3.22.191:5000/myimage   latest              1545e9605745        3 minutes ago       226.3 MB
myimage-app                v1                  d124c70feeee        2 hours ago         226.3 MB
registry                2.0                 0ff65644861b        11 days ago         548.5 MB
registry                latest              204704ce3137        11 days ago         413.8 MB
jenkins                 latest              1520f72eb8b6        3 weeks ago         662 MB
centos                  latest              fd44297e2ddb        4 weeks ago         215.7 MB



Docker client (docker 1.6 for Docker Registry 2.0)

# OS version, docker engine version

[root@docker-client2 ~]# uname -a
Linux docker-client2 2.6.32-504.16.2.el6.x86_64 #1 SMP Tue Apr 21 08:37:59 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@docker-client2 ~]# docker -v
Docker version 1.6.2, build 7c8fca2
[root@docker-client2 ~]# service docker status
docker (pid  3024) is running...


# docker client IP address

[root@docker-client2 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:21:45:93
          inet addr:10.3.23.160  Bcast:10.3.23.255  Mask:255.255.252.0


# docker daemon with argument

[root@docker-client2 ~]# ps -ef | grep docker
root      3024     1  0 May24 ?        00:00:10 /usr/bin/docker -d --insecure-registry 10.3.22.191:5000
root      7548  7445  0 19:51 pts/1    00:00:00 grep docker

[root@docker-client2 ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
centos              latest              fd44297e2ddb        4 weeks ago         215.7 MB


# docker pull an image from remote private docker registry (version 2.0) server

[root@docker-client2 ~]# docker pull 10.3.22.191:5000/myimage
latest: Pulling from 10.3.22.191:5000/myimage

4eb21a2527e9: Pull complete
d124c70feeee: Pull complete
1545e9605745: Already exists
6941bfcbbfca: Already exists
41459f052977: Already exists
fd44297e2ddb: Already exists
Digest: sha256:57d2e2ba8e4bef77ce22f922d126b2c4ace4bc882950609cfa75edd2a70d75af
Status: Downloaded newer image for 10.3.22.191:5000/myimage:latest
[root@docker-client2 ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
10.3.22.191:5000/myimage   latest              1545e9605745        6 hours ago         226.3 MB
centos                  latest              fd44297e2ddb        4 weeks ago         215.7 MB


# check container content

[root@docker-client2 ~]# docker run -t -i 10.3.22.191:5000/myimage
[root@fc25630ffe07 /]# ls -al /tmp
total 28
drwxrwxrwt  7 root root 4096 May 25 23:53 .
drwxr-xr-x 17 root root 4096 May 25 23:53 ..
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .ICE-unix
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .Test-unix
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .X11-unix
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .XIM-unix
drwxrwxrwt  2 root root 4096 Apr 15 14:29 .font-unix
-rw-r--r--  1 root root    0 May 25 17:19 aaa
[root@fc25630ffe07 /]# exit
exit

Saturday, August 16, 2014

Enterprise Linux: Subversion Edge updates

Subversion Edge comes with auto-update mechanism, which will alert the new release. Here are the Subversion Edge updates from 2.3.0 to 4.0.11.








Saturday, May 3, 2014

Bamboo security: Bamboo 5 5.0 Tomcat with SSL

Bamboo 5.5.0 runs on HTTP looks like




Configure Bamboo 5.5.0 runs over HTTPS

# Login as root on Bamboo Linux server.

[root@linux64-bamboo-server ~]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

# su to bamboo running user

[root@linux64-bamboo-server ~]# su - bamboo

# Change dir to bamboo install directory

[root@linux64-bamboo-server ~]$ cd /opt/atlassian-bamboo-5.5.0

# Generate a private key

[bamboo@linux64-bamboo-server atlassian-bamboo-5.5.0]$ $JAVA_HOME/bin/keytool -genkey -keyalg RSA -alias tomcat
Enter keystore password:
Re-enter new password:
What is your first and last name?
  [Unknown]:  linux64-bamboo-server.domain.com
What is the name of your organizational unit?
  [Unknown]:  <my unit>
What is the name of your organization?
  [Unknown]:  <my organization>
What is the name of your City or Locality?
  [Unknown]:  <my city>
What is the name of your State or Province?
  [Unknown]:  <my state>
What is the two-letter country code for this unit?
  [Unknown]:  <my country>
Is CN=linux64-bamboo-server.domain.com, OU=<my unit>, O=<my organization>., L=<my city>, ST=<my state>, C=<my country> correct?
  [no]:  y

Enter key password for <tomcat>
        (RETURN if same as keystore password):

# Generate a CSR (Certificate Signing Request)

[bamboo@linux64-bamboo-server atlassian-bamboo-5.5.0]$ $JAVA_HOME/bin/keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr
Enter keystore password:

# Submit certreq.csr to a certificate authority

Submit the generated certreq.csr to a Certificate Authority (for example, MY-ENTCASERVER) with “Web Server” Certificate template and download certificate chain (DER encoded or Base 64 encoded), save it as bamboo550_Base64.p7b.

# Import signed certificate into keystore

[bamboo@linux64-bamboo-server atlassian-bamboo-5.5.0]$ $JAVA_HOME/bin/keytool -import -alias tomcat -file bamboo550_Der.p7b –keystore ~/.keystore

# Modify server.xml as below accordingly

[root@mtl-nvc-emea08 atlassian-bamboo-5.5.0]# diff -u /opt/atlassian-bamboo-5.5.0/conf/server.xml.orig /opt/atlassian-bamboo-5.5.0/conf/server.xml
--- /opt/atlassian-bamboo-5.5.0/conf/server.xml.orig    2014-08-29 12:05:04.000000000 -0400
+++ /opt/atlassian-bamboo-5.5.0/conf/server.xml 2014-08-29 12:24:14.000000000 -0400
@@ -61,7 +61,6 @@
                    redirectPort="8443"
                    acceptCount="100"
                    disableUploadTimeout="true"/>
-
         <!--
         ====================================================================================

@@ -127,5 +126,20 @@
                    pattern="%a %t &quot;%m %U%q %H&quot; %s %b %D &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot;"/>

         </Engine>
+<Connector port="8443"
+    maxHttpHeaderSize="8192"
+    SSLEnabled="true"
+        maxThreads="150"
+    minSpareThreads="25"
+    maxSpareThreads="75"
+        enableLookups="false"
+    disableUploadTimeout="true"
+    useBodyEncodingForURI="true"
+        acceptCount="100"
+    scheme="https"
+    secure="true"
+        clientAuth="false"
+  sslProtocol="TLS"
+  keystoreFile="/home/bamboo/.keystore" />
     </Service>
 </Server>

# Restart bamboo service

# Secutiry Bamboo 5.5.0 with Tomcat SSL runs over HTTPS looks like

# Bamboo signed own SSL certificate looks like


Saturday, September 14, 2013

Enterprise Linux: WebDav Subversion configuration with authentication and authorization

An example about how to configure WebDav Subversion with authentication and authorization

Requirements:

1. /svn/acme/trunk has been configured with Read/Write access (authorization) for all of users under dev_eng LDAP group (authentication)
2. require to congiure an outsourcing development under /svn/acme/branches/outsourcing with only Read/Write access (authorization) for all of users under outsourcing_dev (authentication)

Configuration procedures:

1. create a new outsourcing_dev LDAP group (for authentication) with all of outsourcing developers
2. create a svn access file for outsourcing_dev Read/Write access (for authorization), /etc/httpd/conf.d/svn-access-control with contents as below
[groups]
outsourcing_dev = user1, user2

[acme_outsourcing:/branches/outsourcing]
@outsourcing_dev = rw
3. insert outsourcing_dev under /etc/httpd/conf.d/subversion.conf
# acme outsourcing repository
<Location "/svn/acme-outsourcing">
        DAV svn
        SVNPath /svn/repositories/acme
        SVNReposName "Subversion Repository [acme-outsourcing]"
        AuthzSVNAccessFile /etc/httpd/conf.d/svn-access-control

# Specify the type of authentication system to use.
        AuthType Basic

# Specify the authorization realm for use in HTTP authentication.
        AuthName "ACME Subversion Repository"

# Specify the authentication provider for this location.
        AuthBasicProvider ldap

# Prevent other authentication modules from authenticating the user if this one fails.
        AuthzLDAPAuthoritative on

# Specify the LDAP server, the base DN, the attribute to use in the search,
# as well as the extra search filter to use.
        AuthLDAPURL "ldap://acme:389/OU=Corp Accounts,DC=acme,DC=com?sAMAccountName?sub?(objectClass=*)" NONE

# Specify the DN to bind with during the search phase.
        AuthLDAPBindDN "CN=srv-svn-ldap,OU=No-logon-rights,OU=Generic,OU=Corp Accounts,DC=acme,DC=com"

# Specify the password to bind with during the search phase.
        AuthLDAPBindPassword uCG4Q79hkG

# Require a valid user.
        Require ldap-group CN=acme_outsourcing,OU=Distribution,OU=Corp Groups,DC=acme,DC=com
</Location>


4. restart Apache Web service

Saturday, August 17, 2013

Enterprise Linux: Use YUM Groups command

How to use yum group commands:

grouplist
groupinfo
groupinstall
groupremove
groupupdate


How to configure own YUM group in own repository for yum groups command

1. yum-groups-manager command execution, for example, DEMO 3.0.0

[root@linux64-app-server ~]# yum-groups-manager -n "DEMO 3.0.0" --id=demo3.0.0 --save=demo3.0.0.xml --mandatory demo-core demo-application
[root@linux64-app-server ~]# cat demo3.0.0.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
<comps>

  <group>
   <id>demo3.0.0</id>
   <default>false</default>
   <uservisible>true</uservisible>
   <display_order>1024</display_order>
   <name>DEMO 3.0.0</name>
   <description></description>
    <packagelist>
      <packagereq type="mandatory">demo-core</packagereq>
      <packagereq type="mandatory">demo-application</packagereq>
    </packagelist>
  </group>
</comps>

2. createrepo command execution with demo3.0.0.xml yum group file

[root@linux64-app-server ~]# createrepo -g /root/demo3.0.0.xml --update /var/www/html/demo-repo/el/6


2.1 repodata with group file looks like

[root@linux64-app-server ~]# find /var/www/html/demo-repo/el/6/repodata
/var/www/html/demo-repo/el/6/repodata
/var/www/html/demo-repo/el/6/repodata/9c6c9a5c272f1dc5b8b0600da36b221c2f3ba27534947ac85dda74ead3fc1932-demo3.0.0.xml
/var/www/html/demo-repo/el/6/repodata/294ee3556b87cc20d28047c46a61b20f17423bd5ffe06869bd625613dff49c68-filelists.sqlite.bz2
/var/www/html/demo-repo/el/6/repodata/repomd.xml
/var/www/html/demo-repo/el/6/repodata/653d4aa8c51772f506dd805d3a2cf3ce645875d871b32324cadff15afeda3751-demo3.0.0.xml.gz
/var/www/html/demo-repo/el/6/repodata/6be82151e5dc44e9d520883151e60356a6c5c93619595578231330aa49467ab3-filelists.xml.gz
/var/www/html/demo-repo/el/6/repodata/3edf95b23750b20e9707e8b4fe247355fd516475655a8f355cf1f1dcdd8cdc70-primary.xml.gz
/var/www/html/demo-repo/el/6/repodata/c0225427874c49ca6cd5f285c40686e487cf30e8327b7e0f95e860724ce8763d-other.xml.gz
/var/www/html/demo-repo/el/6/repodata/3331bfd414bb08c33c26adf51c209d8a9b2c0403821f514bfe4cc1c9560022c3-primary.sqlite.bz2
/var/www/html/demo-repo/el/6/repodata/3d9422756573f00068b6cee6281aec9985775f82abd91f75070c7a2cf7c7549c-other.sqlite.bz2

3. demo-repo.repo file looks like

[root@linux64-app-server ~]# cat /etc/yum.repos.d/demo-repo.repo
[demo-repo]
name=(local yum repo of) DEMO-REPO
baseurl=http://<YUM-REPO-Server>/demo-repo/el/6
enabled=1
gpgcheck=0

4. yum grouplist, yum groupinfo command execution, for example, DEMO 3.0.0

[root@linux64-app-server ~]# yum grouplist | grep DEMO
   DEMO 3.0.0
[root@linux64-app-server ~]#  yum groupinfo "DEMO 3.0.0"
Loaded plugins: security
Setting up Group Process

Group: DEMO 3.0.0
Mandatory Packages:
   demo-core
   demo-application

5. yum groupinstall command execution, for example, DEMO 3.0.0

[root@linux64-app-server ~]# yum groupinstall "DEMO 3.0.0"
Loaded plugins: security
Setting up Group Process
Resolving Dependencies
--> Running transaction check
---> Package demo-core.x86_64 0:3.0.0-19683 will be installed
---> Package demo-application.noarch 0:3.0.0-21746 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================
Package                                                  Arch              Version                                   Repository            Size
=================================================================================================================================================
Installing:
demo-core                                                x86_64            3.0.0-19683                               demo-repo             87 M
demo-application                                         noarch            3.0.0-21746                               demo-repo             25 M

Transaction Summary
=================================================================================================================================================
Install       2 Package(s)

Total download size: 112 M
Installed size: 197 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): demo-core-3.0.0-19683.x86_64.rpm                                                                                   |  87 MB     00:01
(2/2): demo-application-3.0.0-21746.noarch.rpm                                                                            |  25 MB     00:00
-------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                             65 MB/s | 112 MB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : demo-application-3.0.0-21746.noarch                                                                    1/2
  Installing : demo-core-3.0.0-19683.x86_64                                                                           2/2
  Verifying  : demo-application-3.0.0-21746.noarch                                                                    1/2
  Verifying  : demo-core-3.0.0-19683.x86_64                                                                           2/2

Installed:
  demo-core.x86_64 0:3.0.0-19683    demo-application.noarch 0:3.0.0-21746

Complete!

6. yum groupremove command execution, for example, DEMO 3.0.0

[root@linux64-app-server ~]# yum groupremove "DEMO 3.0.0"
Loaded plugins: security
Setting up Group Process
Resolving Dependencies
--> Running transaction check
---> Package demo-core.x86_64 0:3.0.0-19683 will be erased
---> Package demo-application.noarch 0:3.0.0-21746 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================
Package                                                  Arch              Version                                  Repository             Size
=================================================================================================================================================
Removing:
demo-core                                               x86_64             3.0.0-19683                              @demo-repo            168 M
demo-application                                        noarch             3.0.0-21746                              @demo-repo             29 M

Transaction Summary
=================================================================================================================================================
Remove        2 Package(s)

Installed size: 197 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : demo-core-3.0.0-19683.x86_64                                                                           1/2
  Erasing    : demo-application-3.0.0-21746.noarch                                                                    2/2
  Verifying  : demo-application-3.0.0-21746.noarch                                                                    1/2
  Verifying  : demo-core-3.0.0-19683.x86_64                                                                           2/2

Removed:
  demo-core.x86_64 0:3.0.0-19683    demo-application.noarch 0:3.0.0-21746

Complete!

7. yum groupremove command execution, for example, DEMO 3.0.0

[root@linux64-app-server ~]# yum groupupdate "DEMO 3.0.0"
Loaded plugins: security
Setting up Group Process
Package demo-core-3.0.0-19683.x86_64 already installed and latest version
Package demo-application-3.0.0-21746.noarch already installed and latest version
Warning: Group demo3.0.0 does not have any packages.
No packages in any requested group available to install or update