updated puppet lab steps
This commit is contained in:
Родитель
582790fb74
Коммит
d5dd474957
|
@ -360,12 +360,12 @@ that will describe the prerequisites for the Parts Unlimited MRP application.
|
|||
|
||||
>**Note:** For simplicity, we will describe the entire configuration in a single Puppet Program (init.pp from the mrpapp module we created earlier). However, the parts of the configuration could be split into multiple manifests or modules as they grow. This would promote reuse - just as in any good programming language. Also, as well as this init.pp filw we will also edit one other file, war.pp, to allow for easy deployment of the mrp application.
|
||||
|
||||
>**Note:** You can see the complete `init.pp` file <a href="https://raw.githubusercontent.com/Microsoft/PartsUnlimitedMRP/master/Labfiles/DevOps200.2x-InfrastructureasCode/Puppet/final/init.pp" target="_blank"><span style="color: #0066cc;" color="#0066cc">here on github</span></a>
|
||||
>**Note:** You can see the complete `init.pp` file <a href="https://raw.githubusercontent.com/Microsoft/PartsUnlimitedMRP/master/Labfiles/DevOps200.2x-InfrastructureasCode/Puppet/final/init.pp" target="_blank"><span style="color: #0066cc;" color="#0066cc">here on github</span></a> and you should copy and paste its content from here, or the sections below, to your local init.pp.
|
||||
|
||||
|
||||
> **Note:** Tomcat requires the presence of a user and group on the node to access and run the Tomcat services. The default name it uses for both is "Tomcat". There are a number of ways we could create this account and group, such as within the tomcat configuration, but we will add these accounts to the linux node via a separate class in the init.pp file.
|
||||
|
||||
> **Note:** We will also need to edit the permission definition for extracting .war files from our **tomcat7/webapps** folder, which we will do at the end of this task, this will allow the .war file to be automatically extracted when the tomcat service is restarted as the pp file runs.
|
||||
> **Note:** We will also need to edit the permission definition for extracting .war files from our **tomcat7/webapps** folder, which we will do at the end of this task, this will allow the .war file to be automatically extracted when the tomcat service is restarted as the .pp file runs.
|
||||
|
||||
|
||||
|
||||
|
@ -465,7 +465,7 @@ class createuserandgroup {
|
|||
|
||||
group { 'tomcat':
|
||||
ensure => 'present',
|
||||
gid => '10004',
|
||||
gid => '10003',
|
||||
}
|
||||
|
||||
user { 'tomcat':
|
||||
|
@ -475,7 +475,7 @@ user { 'tomcat':
|
|||
password => '!',
|
||||
password_max_age => '99999',
|
||||
password_min_age => '0',
|
||||
uid => '10003',
|
||||
uid => '1003',
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -681,11 +681,7 @@ sudo nano /etc/puppetlabs/code/environments/production/modules/tomcat/manifests/
|
|||
|
||||
Modify the following class at the bottom of the war.pp file and modify the value
|
||||
|
||||
`mode => '0777',`
|
||||
|
||||
to
|
||||
|
||||
`mode => '0777',` i.e. from `0640` to `0777`
|
||||
`mode => '0640',` to `mode => '0777',` i.e. from `0640` to `0777`
|
||||
|
||||
It should look like the below.
|
||||
|
||||
|
@ -704,11 +700,11 @@ It should look like the below.
|
|||
```
|
||||
Let's examine this class:
|
||||
- Line 1: Is specifying the class name, of file, which comes with the tomcat module `tomcat::war`
|
||||
- Line 2: is ensurig the file is present before acting on it.
|
||||
- Line 3: is defining the path which in our instance is /var/lib/tomcat7/webapps. thus is where our mrp application .war file gets copied to in the init.pp file.
|
||||
- Line 4-5: Thsi is defining the user an group owners on the files.
|
||||
- Line 6: thsi is defining the file persmissions, 777 allows for read, write and execute for everyone. You should not do this in a production environment as you will expose your environment to risk allowing potentially malicious code be executed.
|
||||
- >in
|
||||
- Line 2: is ensuring the file is present before acting on it.
|
||||
- Line 3: is defining the path which in our instance is, i.e. /var/lib/tomcat7/webapps. This is where our mrp application .war file gets copied to, in the init.pp file.
|
||||
- Line 4-5: This is defining the user and group owners on the files.
|
||||
- Line 6: This is defining the file permissions, 777 allows for read, write and execute for everyone. **You should not do this in a production environment** as you will expose your environment and risk allowing potentially malicious code be executed.
|
||||
-
|
||||
|
||||
### Task 6: Run the Puppet Configuration on the Node
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче