Deploying an on-line environment using Pupput

Source: Internet
Author: User
Tags using git

Note: This article focuses on Pupput the deployment steps for using GIT versioning to control the on-line environment.

1: Online puppet add git version control

Detailed steps:

pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/ multi-environment/yydev/environment][email protected]/0 # git init ; cd ..;  git clone --bar environment /var/puppet/environment.gitInitialized empty  Git repository in /etc/puppet/multi-environment/yydev/environment/.git/initialized empty  Git repository in /var/puppet/environment.git/warning: You appear to  have cloned an empty repository.pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com  [/etc/puppet/multi-environment/yydev/application] [email protected]/0 # git init  initialized empty git repository in /etc/puppet/multi-environment/yydev/ application/.git/warning: you appear to have cloned an empty  Repository. 


To add an item to git:

Pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/yydev/application]  2015-04-15 17:37:53[email protected]/0 # git status# On branch  master## initial commit## untracked files:#    (use  "git add  <file&gt  to include in what will be committed) ##        modules/nothing added to commit but untracked files  present  (use  "Git add"  to track) pptserver_wangsu_bj_192.168.3.68. Centos.yypuppet.com [/etc/puppet/multi-environment/yydev/application] 2015-04-15 17:37:56[email  protected]/0 # git add modules[email protected]/0 # git commit  -a -m  "Init repo" [master  (root-commit)  8ef11ef] init repo  committer: root <[email protected]_wangsu_bj_192.168.3.68.centos.yypuppet.com>your name and email address  were configured automatically basedon your username and hostname.  Please check that they are accurate. you can suppress this message by setting them explicitly:     git config --global user.name  "Your name"     git  config --global user.email [email protected]if the identity used  for this commit is wrong, you can fix it with:     git commit --amend --author= ' your name <[email protected]> '  2 files changed, 24 insertions (+),  0 deletions (-)  create mode  100644 modules/httpd/files/1.txt create mode 100644&nbsP;modules/httpd/manifests/init.pp 

To configure submission information:

pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/yydev/application] 2015-04-15 17:38:47[email protected]/0 # git config--global user.name "Wangyanliang" pptserver_wangsu_bj_192.168.3.68. centos.yypuppet.com [/etc/puppet/multi-environment/yydev/application] 2015-04-15 17:39:10[email protected]/0 # git Config--global user.email "[Email protected]"


To configure the GIT remote Node name:

Pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/yydev/environment]  2015-04-15 17:51:10[email protected]/0 # git remote add origin / var/puppet/environment.gitpptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/ Multi-environment/yydev/environment] 2015-04-15 17:52:17[email protected]/0 # cd &NBSP, .... /application pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/ Yydev/application] 2015-04-15 17:52:35[email protected]/0 # git remote add  app_origin /var/puppet/application.git[email protected]/0 # git remote - vapp_origin      /var/puppet/application.git  (Fetch) app_origin       /var/puppet/application.git  (push) pptserver_wangsu_bj_192.168.3.68. centos.yypuppet.com [/etc/puppet/multi-ENVIRONMENT/YYDEV/APPLICATION]&NBSP;2015-04-15&NBSP;17:53:36[EMAIL&NBSP;PROTECTED]/0&NBSP;#&NBSP;CD&NBSP, .... /environment/; git remote -vorigin  /var/puppet/environment.git  (FETCH) origin   /var/puppet/environment.git  (push) pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [ /etc/puppet/multi-environment/yydev/environment] 2015-04-15 17:57:08[email protected]/0 #  git remote rm originpptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/ puppet/multi-environment/yydev/environment] 2015-04-15 17:57:18[email protected]/0 #  git remote add env_origin /var/puppet/environment.gitpptserver_wangsu_bj_192.168.3.68. Centos.yypuppet.com [/etc/puppet/multi-environment/yydev/environment] 2015-04-15 17:57:34[email  protected]/0 # git remote -venv_origin      /var/ puppet/environment.git  (feTCH) env_origin      /var/puppet/environment.git  (push) 


To push changes to the GIT repository:

pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/yydev/application] 2015-04-15 17:59:05[email protected]/0 # git push app_origin master:mastercounting objects:8, done. Delta compression using up to 2 threads.compressing objects:100% (3/3), done. Writing objects:100% (8/8), 705 bytes, done. Total 8 (Delta 0), reused 0 (Delta 0) unpacking objects:100% (8/8), done. To/var/puppet/application.git * [New branch] Master, master


Operation Yytest Directory:

2015-04-15 18:00:55[email protected]/0 # git clone /var/puppet/environment.git  environmentfatal: destination path  ' Environment '  already exists and  is not an empty directory.pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/ Puppet/multi-environment/yytest] 2015-04-15 18:01:10[email protected]/0 # rm -rf  environmentpptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/ yytest] 2015-04-15 18:01:38[email protected]/0 # git clone /var/puppet/ environment.git environmentinitialized empty git repository in /etc/puppet/ Multi-environment/yytest/environment/.git/[email protected]/0 # git clone /var/puppet /application.git applicationinitialized empty git repository in /etc/puppet/ Multi-environment/yytest/appliCation/.git/pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/yytest]  2015-04-15 18:02:56[email protected]/0 # cd environment/modules/ ;lsssh   testpptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/ Yytest/environment] 2015-04-16 12:52:53[email protected]/0 # git remote rm  originpptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/yytest/ environment] 2015-04-16 12:53:02[email protected]/0 # git remote add  env_origin /var/puppet/environment.gitpptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/ puppet/multi-environment/yytest/environment] 2015-04-16 12:53:23[email protected]/0 # &NBSP;CD&NBSP, .... /application ; git remote rm origin; git remote add app_origin  /var/puppet/application.gitpptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/yytest/ Application] 2015-04-16 12:53:54[email protected]/0 # git remote -vapp_ origin      /var/puppet/application.git  (Fetch) app_origin       /var/puppet/application.git  (push)

pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/yytest][email  protected]/0 # git clone /var/puppet/application.git applicationinitialized  empty git repository in /etc/puppet/multi-environment/yyprd/application/.git/[email  protected]/0 # git remote rm originpptserver_wangsu_bj_192.168.3.68. Centos.yypuppet.com [/etc/puppet/multi-environment/yyprd/application] 2015-04-16 12:48:31[email  protected]/0 # git remote add app_origin /var/puppet/application.git[email  protected]/0 # git clone /var/puppet/environment.git environmentinitialized  empty git repository in /etc/puppet/multi-environment/yyprd/environment/.git/ pptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/yyprd]  2015-04-16 11:54:32[email protected]/0 # ls environment/modules/ssh  test[email protected]/0 # git remote  rm originpptserver_wangsu_bj_192.168.3.68.centos.yypuppet.com [/etc/puppet/multi-environment/ Yyprd/environment] 2015-04-16 12:49:19[email protected]/0 # git remote add  env_origin /var/puppet/environment.git


This puppet line deployment is complete: Multi-environment configuration unified, and join git, including development, testing, production. Let me see how our environment works together!


2: Collaborative Writing

We assume that the user user1,user2.

User1 is responsible for writing crontab modules.

User2 is responsible for writing Rsyslog modules.


USR1 Steps to implement:







User2 Steps to implement:


This document will be updated in the last two days, please pay attention!

Deploying an on-line environment using Pupput

Related Article

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.