cookbook 'cockpit', '~> 0.4.1'
cockpit (4) Versions 0.4.1 Follow0
Installs/Configures cockpit
cookbook 'cockpit', '~> 0.4.1', :supermarket
knife supermarket install cockpit
knife supermarket download cockpit
cockpit cookbook
This cookbook installs and configures the Cockpit server administration interface.
Scope
- Supports RHEL 7.x
- Install and configure Cockpit service with packages from Red Hat Extras repo
- Optionally install Cockpit features - PCP metrics logging and Kubernetes dashboard
- Deploy custom SSL certificate for Cockpit from Chef Vault or a Chef data bag
- Configure firewalld and SELinux policies for Cockpit
- Specify port for Cockpit console
Requirements
- Tested to work with Chef 12.7.x or higher
- Requires a system with a valid and active Red Hat Subscription and access to Red Hat repositories from redhat.com or via Satellite / Katello.
Simple Cookbooks
This is intended to be the first of a series of simple cookbooks for RHEL 7.x / CentOS 7.x. The idea is to have simple reusable code, minimal dependencies and stick to best practices for RHEL 7.x.
- Always use RPM installs, from official repos where possible
- Include options to configure SELinux, Firewalld, SystemD services
- Common dependencies to support configuration of yum repos, Red Hat subscriptions, manage config files with Augeas, firewalld, and SELinux policies.
Usage
Place a dependency on the cockpit cookbook in your
cookbook's metadata.rb:
depends 'cockpit', '~> 0.4.0'
Or include the default recipe in your run list as 'recipe[cockpit]'.
This cookbook depends on the firewalld cookbook, the augeas cookbook and the Red Hat Subscription Manager cookbook.
Attributes
These attributes can be used to customize the Cockpit install.
- 
node['cockpit']['port']- Modify the listen port for Cockpit.
 Defaults to 9090.
- 
node['cockpit']['logintitle']- Set the LoginTitle attribute in cockpit.conf, which is shown on the login page.
 
- 
node['cockpit']['features']['pcp']- Install the PCP framework to allow Cockpit to store system metrics.
- 
node['cockpit']['features']['kubernetes']- Install the Kubernetes dashboard. At the moment this uses the CentOS 7 Extras repo to get the cockpit-kubernetes package.
- 
node['cockpit']['configure_repo']- Configure / enabled yum repositories for Cockpit as specified bynode['cockpit']['repo']
- 
node['cockpit']['repo']- Three allowed values here:
1)
rhel-7-server-extras-rpms: Use RHEL Extras repo for Cockpit packages, exceptcockpit-kubernetes, if enabled, which has to come form CentOS Extras.2)
centos-extras: Configure CentOS 7 Extras repo to install Cockpit packages only. It is preferable to use theyum-centoscookbook instead.3)
cockpit-preview- Install the latest, bleeding edge versions of Cockpit packages from the cockpit-preview COPR repo
Custom SSL certificate
A custom SSL certificate and key can be provided as follows:
* node['cockpit']['ssl_vault'] - Name of data bag or Chef vault
* node['cockpit']['ssl_item'] - Name of item in vault / data bag containing JSON keys for the certificate (cert) and private key (key) in the PEM format. See test/integration/data_bags for an example.
Testing
Integration tests are written in BATS
Contributing
- Fork it ( https://github.com/colourmeamused/cockpit-cookbook )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Dependent cookbooks
| redhat_subscription_manager ~> 0.5.0 | 
| firewalld ~> 1.1.1 | 
| selinux_policy ~> 0.9.5 | 
| augeas >= 0.0.0 | 
| chef-vault >= 0.0.0 | 
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
        
            0.4.1 failed this metric
            Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
        
      Contributing File Metric
        
            0.4.1 failed this metric
            Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
        
      Foodcritic Metric
        
            0.4.1 failed this metric
            FC066: Ensure chef_version is set in metadata: cockpit/metadata.rb:1
FC069: Ensure standardized license defined in metadata: cockpit/metadata.rb:1
FC070: Ensure supports metadata defines valid platforms: cockpit/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
        
      No Binaries Metric
        
            0.4.1 passed this metric
        
      Testing File Metric
        
            0.4.1 failed this metric
            Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
        
      Version Tag Metric
        
            0.4.1 failed this metric
            Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
        
  
0.4.1 failed this metric
            0.4.1 failed this metric
            Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
        
            0.4.1 failed this metric
            FC066: Ensure chef_version is set in metadata: cockpit/metadata.rb:1
FC069: Ensure standardized license defined in metadata: cockpit/metadata.rb:1
FC070: Ensure supports metadata defines valid platforms: cockpit/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
        
      No Binaries Metric
        
            0.4.1 passed this metric
        
      Testing File Metric
        
            0.4.1 failed this metric
            Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
        
      Version Tag Metric
        
            0.4.1 failed this metric
            Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
        
  
0.4.1 failed this metric
FC069: Ensure standardized license defined in metadata: cockpit/metadata.rb:1
FC070: Ensure supports metadata defines valid platforms: cockpit/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
            0.4.1 passed this metric
        
      Testing File Metric
        
            0.4.1 failed this metric
            Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
        
      Version Tag Metric
        
            0.4.1 failed this metric
            Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
        
  
0.4.1 failed this metric
            0.4.1 failed this metric
            Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number