Code Monkey home page Code Monkey logo

open-install-library's Introduction

Community Plus header

Open Install Library

Non Regression Testing License Release

A collection of recipes designed to support the automated installation and setup of New Relic products and integrations.

Mission

Deliver a consistent user experience, open source ecosystem, and platform services that allow any engineer in the world:

  • to go from inadequate monitoring
  • to complete instrumentation of their environment
  • to realizing a win with New Relic

in 5 minutes or less.

Commands

Linux/MacOS

# Installs the newrelic-cli and invokes the install command
# Replace <API_KEY> AND <ACCOUNT_ID> with your own
curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=<API_KEY> NEW_RELIC_ACCOUNT_ID=<ACCOUNT_ID> /usr/local/bin/newrelic install

Windows

[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls'; 
(New-Object System.Net.WebClient).DownloadFile("https://download.newrelic.com/install/newrelic-cli/scripts/install.ps1", "$env:TEMP\install.ps1"); & $env:TEMP\install.ps1; $env:NEW_RELIC_API_KEY='<API_KEY>'; $env:NEW_RELIC_ACCOUNT_ID='<ACCOUNT_ID>'; & 'C:\Program Files\New Relic\New Relic CLI\newrelic.exe' install

Docs

Project documentation can be found under docs.

Testing

The testing of recipes is automated, and those are tested on a freshly provisioned environment and re-provisioned on every test run.

Test definitions files are located under the path test/definitions. Those definitions are used with the Deployer to provision all the required resources, run the recipe installation, validate the installation is feeding data into newrelic, and finally teardown all the provisioned resources.

More information about the test framework testing can be found at Test Framework.

Manual testing

Refer to Manual Testing instructions

Support

New Relic hosts and moderates an online forum where customers can interact with New Relic employees as well as other customers to get help and share best practices. Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub. You can find this project's topic/threads here:

Add the url for the support thread here

Contributing

We encourage your contributions to improve Open Install Library! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at [email protected].

License

Open Install Library is licensed under the Apache 2.0 License.

open-install-library's People

Contributors

alvarocabanas avatar amolero-nr avatar avinash-sanpala avatar brushknight avatar carlossscastro avatar ctrombley avatar devfreddy avatar fryckbos avatar jaffinito avatar jakubkotkowiak avatar jbeveland27 avatar jcolemannr avatar jlegoff avatar julien4218 avatar mbruzina avatar meiao avatar noahmmcgivern avatar nr-ahemsath avatar nrhzhao avatar nsspkrishna avatar pchinthapenta avatar ravitejasurampudi avatar rthorn-nr avatar rubenruizdegauna avatar sanderblue avatar setamydg avatar svetlanabrennan avatar vuqtran88 avatar xqi-nr avatar zlesnr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

open-install-library's Issues

Create build/release process for compiling recipes into a format the recipe service can consume

The recipe library in this repo serves as the config data store of New Relic integrations. These recipes need to be rolled up and passed to the backend recipe service. We need a workflow that compiles a list of these recipes into a document DB/artifact and initiates a call to the recipe service to update its data cache.

Acceptance Criteria:

  • GitHub Actions workflow that generates a build artifact of the recipes
  • GitHub Actions workflow/webhook that triggers a refresh of the document store for the recipe service

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-33

Create automation to compile and release a version of the database

On a release action, we need to compile the existing versions of the recipes into one document for consumption by the recipe service. This is likely accomplished with GitHub actions and compiled format that can be parsed and processed into the service that's handling interaction with NerdGraph.

Create Linux recipe for Apache OHI

Documentation: https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/apache-monitoring-integration

Necessary Configuration:

The default status URL works for an OOB apache2 installation.

For Logging: Ensure that common log file directories/patterns & process name for Apache is populated in the beginning of the recipe.

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-46

Augment recipe capability to enable user input and write configuration.

We need the ability to prompt for user input and provide instructions to write to a NR configuration file based on that user input. This is a common use case for many instrumentation/ integration installations.

Some example use cases:

  • Allow user to provide basic necessary configuration information, such as the application name.
  • Prompt the user for log files that they'd like to ingest and use it to write appropriate YAML files

Acceptance Criteria: Demonstrate accepting user input by prompting for a log file, and show that log data is coming into New Relic from that log file.

Acceptance Criteria:

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-7

Create Linux JMX Recipe

Documentation: https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/jmx-monitoring-integration

Necessary Configuration:

  • JMX Username: Prompt user to enter
  • JMX Password: Prompt user to enter
  • JMX Host: Allow user to confirm default of localhost, or enter new
  • JMX Port : Allow user to confirm default of 9999, or enter new
  • IF user is using Tomcat based on process discovery data
    • Copy the tomcat-metrics.yml.sample file and name it tomcat-metrics.yml to enable
    • Output to the user We have detected you are running Tomcat, the default tomcat-metrics config file has been copied to /etc/integrations.d. NOTE you may need to configure your tomcat JVM to receive JMX Data by setting appropriate CATALINA_OPTS. Please refer to your Tomcat documentation for additional details on how to enable JMX.
  • IF user is using JBoss based on process discovery data set jmx_remote to true.
    • Prompt: We have detected JBoss on your system. Would you like to enable the Jboss Connection Format (Y/N) If user selects Y then set jmx_remote_jboss_standalone to true, otherwise set to false.
  • Prompt: Are you using SSL?(Y/N) If YES
    • Prompt Enter key store file path if applicable):
    • Prompt Enter key store password if applicable):
    • Prompt Enter trust store file path if applicable:
    • Prompt Enter trust store password if applicable:

Based on these prompts set variables key_store, key_store_password, trust_store, trust_store_password in the config file accordingly.

This particular integration needs to be tested with tomcat, JBoss, and another generic Java service.

For Logging: Ensure that common log file directories/patterns & process name for JMX is populated in the beginning of the recipe.

Sheila 1/7/2021: CC needs to test JBoss, Tom Cat and generic java svc on each distro.

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-53

MVP for validation of recipes and testing framework

The goal of the open install library is to accept external contributions from other stakeholders within New Relic and the community. In order to validate the contributions, we will need a framework for testing the recipes and determining whether they function properly and are able to be released.

The scope of this MMF is to create an early prototype for this framework.

Acceptance Criteria:

  • Validate the structure of a recipe through a schema validator/linter
  • GitHub Actions workflow that configures a testing pipeline on AWS and runs the appropriate recipe files for Amazon Linux 2 and Ubuntu
  • Validation of data flowing into New Relic

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-32

Create Linux recipe for Cassandra

Documentation: https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/cassandra-monitoring-integration.

Necessary Configuration :

  • Username: (Prompt user to enter)
  • Password: (Prompt user to enter)
  • Hostname: (Allow user to confirm default of localhost, or enter new value)
  • Port: (Allow user to confirm default port of 9042, or enter new value).

Note: The default cassandra port is different in our docs and base config file, and this is not the default port that Cassandra runs with. We should use the 9042 default in our version of the config file.

For Logging: Ensure that common log file directories/patterns & process name for Cassandra is populated in the beginning of the recipe.

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-47

Switch from infra-install-based recipe to open-install-library-based recipe

AC

  • Fix whatever is currently not working about the open-install-library recipe
  • Update the demo command to
    curl -Ls https://raw.githubusercontent.com/newrelic/newrelic-cli/master/scripts/install.sh | sudo bash && NEW_RELIC_API_KEY=NRAK-... NEWRELIC_ACCOUNT_ID=... NEW_RELIC_REGION=US NEW_RELIC_CLI_PRERELEASEFEATURES=ALLOW newrelic install -c https://raw.githubusercontent.com/newrelic/open-install-library/main/infrastructure/agent/amazonlinux2.yml?token=...
  • Run through the demo steps and ensure everything still works

Create Linux HashiCorp Consul Recipe

Documentation: https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/hashicorp-consul-monitoring-integration

Display to user: If using ACL, the credentials for the Consul integration must have the following policies: agent:read, node:read, and service:read.

Necessary Configuration for Prompting:

  • Hostname: (Have user confirm default of localhost, enter new hostname if desired)
  • Port: ( Have user confirm default port of 8500, or enter new).
  • Token: Prompt user: _If you're using an ACL Token for authentication, please enter the token: else press [Enter] to continue. _If the user leaves this entry blank by pressing enter, do not populate the token field in the sample YAML file.
  • Prompt user,_ Are you using SSL (y/n). _
    • IF YES-
    • Set enable_ssl configuration parameter to true.
    • Prompt User: Would you like to trust the server certificate? (y/n)
    • If Yes- No further action necessary
    • IF No- Prompt user for the ca_bundle_dir or the ca_bundle file by saying: _Please enter the certificate authority bundle directory or file. _
    • If NO- No further action is needed

For Logging: Ensure that common log file directories/patterns & process name for HashiCorp Consul is populated in the beginning of the recipe.

Update from sheila 1/7/2021 - Asking CC to pause on this work. Low priorioty for Virtuosos engineers to help with this.

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-52

Create Linux Recipe for Elasticsearch

Documentation: https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/elasticsearch-monitoring-integration

Necessary Configuration for Prompting:

  • Username :(Prompt user)
  • Password : (Prompt user)
  • Hostname: (Have user confirm default of localhost, enter new hostname if desired)
  • Port: ( Have user confirm default port of 9200, or enter new).
  • Config Path : (Have user confirm default path of /etc/elasticsearch/elasticsearch.yml, or enter new)
  • Prompt user and ask,_ Are you using SSL (y/n). _
    • IF YES- Set use_ssl configuration parameter to true, and prompt user for the ca_bundle_dir or the ca_bundle file by saying: _Please enter the certificate authority bundle directory or file. _
    • If NO- No further action is needed

The way the specific configuration file is structured for elasticsearch, the recipe will need to automatically set the following config parameters to these default values. The remaining optional fields can be kept as is.

  • command:all
  • cluster_environemnt: staging
  • timeout: 30

For Logging: Ensure that common log file directories/patterns & process name for Elasticsearch is populated in the beginning of the recipe.

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-49

Create Linux HAProxy Recipe

Documentation: https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/haproxy-monitoring-integration

Necessary Configuration:

  • Username: (Prompt User)
  • Password: (Prompt User)
  • Stats URL: (Prompt User)

Cluster name and remaining default values should be able to be kept as is in the configuration file.

For Logging: Ensure that common log file directories/patterns & process name for HAProxy is populated in the beginning of the recipe.

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-51

Automated agent bundling for containerized applications

For containerized environments, and for language agents that require modifications to source code- customers typically "bundle" agents in within their application. This usually entails making changes to Dockerfiles in addition to modifying source code and dependencies for certain languages.

Requirement Overview : Provide capabilities to interrogate and modify a Dockerfile in order to bundle agents in with a containerized application through the new relic CLI. This tooling will need to be accompanied by CI platform specific guidance or an integration (if possible) to expose the NR license key in a secure manner.

Acceptance Criteria:

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-12

Create Linux recipe for Couchbase

Documentation

https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/couchbase-monitoring-integration

Necessary Configuration:

  • Username :(Prompt user)
  • Password : (Prompt user)
  • Hostname: (Have user confirm default of localhost, enter new hostname if desired)
  • API Port: ( Have user confirm default port of 8091). Note this value is port in the config file.
  • Query Port ( Have User confirm default port of 8093)
  • Prompt user and ask,_ Are you using SSL (y/n). _
    • IF YES- Set use_ssl configuration parameter to true, and prompt user for the ca_bundle_dir or the ca_bundle file by saying: _Please enter the certificate authority bundle directory or file. _
    • If NO- No further action is needed

For Logging: Ensure that common log file directories/patterns & process name for Couchbase is populated in the beginning of the recipe.

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-48

Create a one command install and config workflow of logging ingestion through Infra Agent for Linux

See overall User flow & narrative document for reference.

Prompt the user to choose between auto-discovery or manual specification path.

Auto Discovery Path

Allow auto-discovery option where we leverage the process detector & log detector metadata to auto-detect relevant systemd services and application logs on the host. Auto discovery and detection of log files will be limited in scope to technologies we support within OHIs for the MVP.
**
Manual Specification Path**
The user is prompted for 1) What log files they'd like to ingest and 2) Specify what services on the system they'd like to ingest data from

Using either the auto discovery information or the input specified by the user, we will update the YAML configurations in the logging.d directory with the appropriate files and systemd services.

Note to ClearCode: Ignore this issue, this will be handled internally by New Relic.

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-22

Framework for Automated agent bundling for containerized applications

For containerized environments, and for language agents that require modifications to source code- customers typically "bundle" agents in within their application. This usually entails making changes to Dockerfiles in addition to modifying source code and dependencies for certain languages.

Requirement Overview : Provide capabilities to interrogate and modify a Dockerfile in order to bundle agents in with a containerized application through the new relic CLI. This tooling will need to be accompanied by CI platform specific guidance or an integration (if possible) to expose the NR license key in a secure manner.

Acceptance Criteria:

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-12

Augment recipe capability to enable user input and write configuration.

We need the ability to prompt for user input and provide instructions to write to a NR configuration file based on that user input. This is a common use case for many instrumentation/ integration installations.

Some example use cases:

  • Allow user to provide basic necessary configuration information, such as the application name.
  • Prompt the user for log files that they'd like to ingest and use it to write appropriate YAML files

Acceptance Criteria:

Aha! Link: https://newrelic.aha.io/features/VIRTUOSO-7

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.