Commit f3117a46c90f4030f25c6f86453b4e726afdf299

Authored by root ago
1 parent 8a5b6f28d3
Exists in master

papply.sh has added. remove all specific bash has deleted

Showing 11 changed files with 36 additions and 57 deletions Side-by-side Diff

... ... @@ -7,15 +7,6 @@
7 7 1. install puppet
8 8 $ sudo sh install.sh
9 9  
10   -2. select which server you want
11   -$ ls manifest
12   -$ sudo puppet apply [*.pp file path] --modulepath=[module path] $*
13   -
14   -3. that's all
15   -
16   -Port Policy
17   -
18   -NGINX : 80
19   -HAPROXY : 8000
20   -FPM : 9000
  10 +2. use it as many as you want in bin folder
  11 +$ sudo sh papply.sh [manifest file name]
api-deploy.sh View file @ f3117a4
1   -hostname KR-API-01
2   -puppet apply manifests/api-server-deploy.pp --modulepath=/root/puppet/modules::/etc/puppet/modules --debug
1   -hostname BMTPIKI-X-DB1
2   -puppet apply manifests/bmt-server.pp --modulepath=/root/puppet/modules:/etc/puppet/modules --debug
manifests/api-deploy.pp View file @ f3117a4
  1 +node /^kr-api-\d+$/ {
  2 +
  3 + class { 'java':
  4 + distribution => 'jdk',
  5 + }
  6 +
  7 + class { 'maven::maven':
  8 + version => '3.1.1',
  9 + }
  10 +
  11 + vcsrepo { '/tmp/pikicast-new-api':
  12 + ensure => latest,
  13 + provider => git,
  14 + source => 'ssh://git@gitlab.pikicast.com:2222/piki_devops/pikicast-new-api-v1-1.git',
  15 + revision => 'master',
  16 + }
  17 +
  18 + exec { 'build_pikicast-new-api':
  19 + cwd => '/tmp/pikicast-new-api',
  20 + command => 'mvn -U clean compile package -Dmaven.test.skip=true',
  21 + path => '/usr/local/bin/:/usr/bin:/bin',
  22 + }
  23 +}
manifests/api-server-deploy.pp View file @ f3117a4
1   -node /^kr-api-\d+$/ {
2   -
3   - class { 'java':
4   - distribution => 'jdk',
5   - }
6   -
7   - class { 'maven::maven':
8   - version => '3.1.1',
9   - }
10   -
11   - vcsrepo { '/tmp/pikicast-new-api':
12   - ensure => latest,
13   - provider => git,
14   - source => 'ssh://git@gitlab.pikicast.com:2222/piki_devops/pikicast-new-api-v1-1.git',
15   - revision => 'master',
16   - }
17   -
18   - exec { 'build_pikicast-new-api':
19   - cwd => '/tmp/pikicast-new-api',
20   - command => 'mvn -U clean compile package -Dmaven.test.skip=true',
21   - path => '/usr/local/bin/:/usr/bin:/bin',
22   - }
23   -}
manifests/web-deploy.pp View file @ f3117a4
  1 +node /^kr-web-\d+$/, /^kr-web-proxy-\d+$/ {
  2 + vcsrepo { '/var/www/pikicast-web-ci':
  3 + ensure => latest,
  4 + provider => git,
  5 + source => 'ssh://git@gitlab.pikicast.com:2222/Owen/pikicast-web-ci.git',
  6 + revision => 'master',
  7 + }
  8 +}
manifests/web-proxy.pp View file @ f3117a4
... ... @@ -29,12 +29,5 @@
29 29 ensure => present,
30 30 source => 'puppet:///modules/nginx/http.conf.webproxy.real',
31 31 }
32   -
33   - vcsrepo { '/var/www/pikicast-web-ci':
34   - ensure => latest,
35   - provider => git,
36   - source => 'ssh://git@gitlab.pikicast.com:2222/Owen/pikicast-web-ci.git',
37   - revision => 'master',
38   - }
39 32 }
manifests/web-server.pp View file @ f3117a4
... ... @@ -16,12 +16,5 @@
16 16 ensure => present,
17 17 source => 'puppet:///modules/php/php.ini.webserver.real',
18 18 }
19   -
20   - vcsrepo { '/var/www/pikicast-web-ci':
21   - ensure => latest,
22   - provider => git,
23   - source => 'ssh://git@gitlab.pikicast.com:2222/Owen/pikicast-web-ci.git',
24   - revision => 'master',
25   - }
26 19 }
  1 +#!/bin/sh
  2 +
  3 +puppet apply manifests/$1 --modulepath=/root/puppet/modules::/etc/puppet/modules
1   -hostname KR-WEB-PROXY-01
2   -puppet apply manifests/web-proxy.pp --modulepath=/root/puppet/modules::/etc/puppet/modules
1   -hostname KR-WEB-01
2   -puppet apply manifests/web-server.pp --modulepath=/root/puppet/modules::/etc/puppet/modules --debug