This project is a containerized version of New Relic Nerdpack SLO.
These instructions will allow you to set the project up and running on your local machine for development and testing purposes.
- docker
- docker-compose
- GNU make
For Linux users
sudo apt-get install build-essential
For Mac users You can get make with the latest version of Xcode (with Make), available from Apple's Mac Dev Center.
- Docker If you will follow the set-up with Docker (see below) then install last Docker for your specific OS.
Note: before being able to run NR1 you will need to set the New Relic API Key in both:
- .env
- devcontainer.env
There are 2 ways to install the current project
- with Visual Studio Code
From the root of the project launch
cd <YOUR_PROJECT_ROOT_DIRECTORY>
code .
It should automatically propose you to build and run the project into a container. If not just follow the steps indicated on Microsoft's offical documentation.
Then open the terminal of the container and run
cd <YOUR_PROJECT_ROOT_DIRECTORY>
make prepare
- without Visual Studio Code
From the root of the project
cd <YOUR_PROJECT_ROOT_DIRECTORY>
cd .devcontainer
docker-compose up -d --build --force-recreate
make prepare
- commands
You can create a new package by giving a name as an environment variable
cd <YOUR_PROJECT_ROOT_DIRECTORY>
PROJECT_NAME=my-awesome-nerdpack make create
Then you can try it by running the serve command (remembering to declare it as an environment variable)
cd <YOUR_PROJECT_ROOT_DIRECTORY>
PROJECT_NAME=my-awesome-nerdpack make run
docker exec -it qa-newrelic-slo bash -c 'cd my-awesome-nerdpack && nr1 nerdpack:serve'
Found and loaded 2 nr1.json files on MyAwesomeNerdpack (170f3d36-b183-49a5-a34a-9d92fa9b08e1) Nerdpack.
Nerdpack:
✔ MyAwesomeNerdpack (170f3d36-b183-49a5-a34a-9d92fa9b08e1) nr1.json
Launchers:
✔ my-awesome-nerdpack-launcher launchers/my-awesome-nerdpack-launcher/nr1.json
Nerdlets:
✔ my-awesome-nerdpack-nerdlet nerdlets/my-awesome-nerdpack-nerdlet/nr1.json
There is no certificate created yet.
✔ New certificate created.
🛠 Built artifact files for:
⁎ 170f3d36-b183-49a5-a34a-9d92fa9b08e1--my-awesome-nerdpack-nerdlet built ✔
✔ Nerdpack built successfully!
★ Starting as orchestrator...
✔ Server ready! Test it at: https://one.eu.newrelic.com/?nerdpacks=local
↩ Server will reload automatically if you modify any file!
🛠 Built artifact files for:
⁎ 170f3d36-b183-49a5-a34a-9d92fa9b08e1--my-awesome-nerdpack-nerdlet built ✔
✔ Nerdpack built successfully!
At this point you just need to open that URL from your browser being sure to be logged in and
If needed you can remove the project
cd <YOUR_PROJECT_ROOT_DIRECTORY>
PROJECT_NAME=my-awesome-nerdpack make remove
the distribution installed on the remote container is a Debian 9 based.
<jira-ticket> | <type>(<scope>): <subject>
Type | Description |
---|---|
style |
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
chore |
Changes to the build process or auxiliary tools and libraries such as documentation generation |
docs |
Documentation Updates |
feat |
New Features |
fix |
Bug Fixes |
refactor |
Code Refactoring |
test |
Adding missing tests |
perf |
A code change that improves performance |
https://github.com/newrelic/nr1-slo-r
https://discuss.newrelic.com/t/track-your-service-level-objectives-with-the-slo-r-nerdpack/90046