Coder Social home page Coder Social logo

googlecloudplatform / google-cloud-ops-agents-puppet Goto Github PK

View Code? Open in Web Editor NEW
5.0 40.0 13.0 56 KB

Managed Google Stackdriver Logging Agent via Puppet

License: Apache License 2.0

Puppet 27.64% Shell 32.47% Ruby 32.16% HCL 7.74%
google stackdriver-logs puppet google-gcompute stackdriver-monitoring stackdriver stackdriver-agent

google-cloud-ops-agents-puppet's Introduction

Google Cloud Operations Agents Puppet Integration

Status Status Status

Description

Puppet module for Google Cloud Operations agents.

Support Matrix

Requirements

https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent#access

Prerequisite Modules

The following modules must be available on the Puppet server:

Install Module

Install Module from Source

To build the module from source:

  • Build: pdk build
  • Copy to your Puppet server
    • The built module can be found in pkg/
  • Install: puppet module install ops-cloud_ops-0.1.0.tar.gz
  • Verify: puppet module list

Usage

Parameter Default Description
agent_type Required The agent type. The allowed values are: ops-agent, monitoring, logging
package_state present Whether the agent should be installed or not. The allowed values are: present and absent.
version latest The version variable can be used to specify which version of the agent to install. The allowed values are latest, MAJOR_VERSION.*.* and MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION, which are described in detail below.
main_config Optional value for overriding the default configuration. For configuration syntax instructions, see Ops Agent Config, Logging Agent Config, and Monitoring Agent for more details.
additional_config_dir Optional value for overriding the plugins directory for the monitoring or logging agents

Version

  • version=latest

    • This setting makes it easier to keep the agent version up to date, however it does come with a potential risk. When a new major version is released, the policy may install the latest version of the agent from the new major release, which may introduce breaking changes. For production environments, consider using the version=MAJOR_VERSION.. setting below for safer agent deployments.
  • version=MAJOR_VERSION.*.*

    • When a new major release is out, this setting ensures that only the latest version from the specified major version is installed, which avoids accidentally introducing breaking changes. This is recommended for production environments to ensure safer agent deployments.
  • version=MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION

    • This setting is not recommended since it prevents upgrades of new versions of the agent that include bug fixes and other improvements.

Example:

An example implementation can be found in test/cases/linux/ops-agent/latest/install/manifests/site.pp

Ops Agent

Install the latest version:

google_cloud_ops::agent {'ops-agent':
  agent_type  => 'ops-agent',
}

Ops Agent with Custom Configuration

This example assumes:

  • The module's name is example
  • The module example has a file at files/ops_agent/config.yaml that represents the custom configuration

Install version 1.0.5 and use a custom configuration:

google_cloud_ops::agent {'ops-agent':
  agent_type  => 'ops-agent',
  installed   => true,
  version     => '1.0.5',
  main_config => 'puppet:///modules/example/ops_agent/config.yaml',
}

Remove Ops Agent

Ensure the agent is not installed by setting installed to false:

google_cloud_ops::agent {'ops-agent':
  agent_type  => 'ops-agent',
  installed   => false,
  version     => 'latest',
}

Install Monitoring Agent

  • Install latest release of major version 6
  • Use custom configuration
  • Use custom plugins
google_cloud_ops::agent {'monitoring-agent':
  agent_type            => 'monitoring',
  installed             => true,
  version               => '6.*.*',

  # optional
  main_config           => 'puppet:///modules/example/monitoring/collectd.conf',
  additional_config_dir => 'puppet:///modules/example/monitoring/plugins'
}

Install Logging Agent

  • Install latest release
  • Use custom configuration
  • Use custom plugins
google_cloud_ops::agent {'logging-agent':
  agent_type            => 'logging',
  installed             => true,
  version               => 'latest',

  # optional
  main_config           => 'puppet:///modules/example/logging/google-fluentd.conf',
  additional_config_dir => 'puppet:///modules/example/logging/plugins'
}

License

Copyright 2021 Google Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License.  You may obtain a copy of the
License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.  See the License for the
specific language governing permissions and limitations under the License.

google-cloud-ops-agents-puppet's People

Contributors

i1tech avatar jsirianni avatar nat-henderson avatar nelsonjr avatar qingling128 avatar rambleraptor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-cloud-ops-agents-puppet's Issues

Enable hourly CI

Github actions should run hourly to ensure no outside factors have broken the module

Unknown resource type: 'google_cloud_ops::agent'

Running on CentOS Linux release 7.9.2009 (Core) on puppet 6.21.0
Followed documentation and manually installed the module, it installed to
'/etc/puppetlabs/code/environments/production/site-modules'

tried with a node but getting this error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Unknown resource type: 'google_cloud_ops::agent' (file: /etc/puppetlabs/code/environments/ops_agent_check/site-modules/profile/manifests/stackdriver/opsagent.pp, line: 9, column: 1) on node testing-00_8234155039306228246

maybe I'm doing something wrong? anybody has any clues to spare?

Thanks

PGP Key Expired

The PGP key (D0BC747FD8CAF7117500D6FA3746C208A7317B0F) used to sign the Ubuntu/Debian packages expired in 2018 and installing the agent on those OS's fails.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.