Skip to content

Commit

Permalink
Final fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alvagante committed Sep 25, 2024
1 parent 4283bac commit b084fc9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ This module requires functions provided by the [Puppet Labs Stdlib Module](https

Install the module from the Forge:

```bash {"id":"01J8MJ40BQWMDAJC3F710YREN4"}
```bash
puppet module install example42/puppi
```

To use the Puppi just declare or include the puppi class

```ruby {"id":"01J8MJ40BQWMDAJC3F7286XQQK"}
```ruby
include puppi
```

If you have resources conflicts, do not install automatically the Puppi dependencies (commands and packages)

```ruby {"id":"01J8MJ40BQWMDAJC3F72Q9E3VZ"}
```ruby
class { 'puppi':
install_dependencies => false,
}
Expand All @@ -50,7 +50,7 @@ Once Puppi is installed you can use it to:

* Easily define in Puppet manifests Web Applications deploy procedures. For example:

```ruby {"id":"01J8MJ40BQWMDAJC3F748G9HWW"}
```ruby
puppi::project::war { "myapp":
source => "http://repo.example42.com/deploy/prod/myapp.war",
deploy_root => "/opt/tomcat/myapp/webapps",
Expand All @@ -68,15 +68,15 @@ Once enabled for each module you have puppi check, info and log commands.

To enable Puppi integration in OldGen (version 1) Example42 Modules, set in the scope these variables:

```html {"id":"01J8MJ40BQWMDAJC3F74Q6B0KZ"}
```html
$puppi = yes # Enables puppi integration
$monitor = yes # Enables automatic monitoring
$monitor_tool = "puppi" # Sets puppi as monitoring tool
```

## USAGE OF THE PUPPI COMMAND (OLD GEN)

```bash {"id":"01J8MJ40BQWMDAJC3F7615PETB"}
```bash
puppi <action> <project_name> [ -options ]
```

Expand Down Expand Up @@ -122,7 +122,7 @@ You can also provide some options:

Some common puppi commands when you log for an application deployment:

```bash {"id":"01J8MJ40BQWMDAJC3F790N39R5"}
```bash
puppi check
puppi log & # (More readable if done on another window)
puppi deploy myapp
Expand Down
8 changes: 5 additions & 3 deletions spec/defines/install_packages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
let(:title) { 'namevar' }
let(:node) { 'rspec.example42.com' }
let(:pre_condition) { 'include puppi' }
let(:params) do
{}
end
let(:params) {
{
'packages' => 'top',
}
}
it { is_expected.to compile }
end
end
Expand Down
9 changes: 3 additions & 6 deletions spec/defines/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@
}
}

describe 'Test puppi report step file creation' do
it 'should create a puppi::report step file' do
should contain_file('/etc/puppi/projects/myapp/report/50-get').with_ensure('present')
end
it 'should populate correctly the puppi::report step file' do
should contain_file('/etc/puppi/projects/myapp/report/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n")
describe 'Test puppi project configuration file' do
it 'should create a puppi::project configuration file' do

Check failure on line 20 in spec/defines/project_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::project on redhat-8-x86_64 Test puppi project configuration file should create a puppi::project configuration file Failure/Error: should contain_file('/etc/puppi/projects/myapp/config').with_ensure('present') expected that the catalogue would contain File[/etc/puppi/projects/myapp/config]

Check failure on line 20 in spec/defines/project_spec.rb

View workflow job for this annotation

GitHub Actions / Unit tests

puppi::project on redhat-8-x86_64 Test puppi project configuration file should create a puppi::project configuration file Failure/Error: should contain_file('/etc/puppi/projects/myapp/config').with_ensure('present') expected that the catalogue would contain File[/etc/puppi/projects/myapp/config]
should contain_file('/etc/puppi/projects/myapp/config').with_ensure('present')
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/defines/report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

describe 'Test puppi report step file creation' do
it 'should create a puppi::report step file' do
should contain_file('/etc/puppi/projects/myapp/report/50-get').with_ensure('file')
should contain_file('/etc/puppi/projects/myapp/report/50-get').with_ensure('present')
end
it 'should populate correctly the puppi::report step file' do
should contain_file('/etc/puppi/projects/myapp/report/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n")
Expand Down

0 comments on commit b084fc9

Please sign in to comment.