-
-
Notifications
You must be signed in to change notification settings - Fork 725
Skylight setup
What follows is a brief documenting on how to setup Skylight to monitor a particular OFN instance's performance.
First, create a Skylight account for open source at https://www.skylight.io/oss. In the signup form mention that we already have an Open Food Network account for Barcelona and that we need one for your instance.
All configuration required in the app has already been introduced in https://github.com/openfoodfoundation/openfoodnetwork/pull/2070 and https://github.com/openfoodfoundation/openfoodnetwork/pull/2080. Furthermore, ofn-install has also support for it, added in https://github.com/openfoodfoundation/ofn-install/pull/137 and https://github.com/openfoodfoundation/ofn-install/pull/153.
All you need to do is to specify the skylight_authentication
var containing the authentication token you will find in your Skylight settings in your secrets file.
Take a look at inventory/host_vars/_example.com/secrets.example.yml.
Then, you can provision your instance's server running
$ ansible-playbook playbooks/provision.yml --limit=staging -e <path_to_your_secrets_yml> --ask-vault-pass
You can check out the details about the provision process in https://github.com/openfoodfoundation/ofn-install/wiki/Provisioning.
Once the env var is in place, which you can check running echo $SKYLIGHT_AUTHENTICATION
, restart the unicorn so that it reads this new variable as follows:
sudo systemctl restart unicorn_openfoodnetwork.service
Check the Rails' log file and you should see something like:
$ tail -f log/staging.log
...
[SKYLIGHT] [1.6.1] Skylight agent enabled
...
Skylight also has its own log file in log/skylight.log
, which should only have
a line like:
# Logfile created on 2018-05-17 11:37:42 +0000 by logger.rb/44203
This one is your go-to file when debugging anything related to Skylight. All messages are logged there.
All these steps have proved to work in Katuma but if you happen to experience any problem make sure you run the latest version of OFN and that the SKYLIGHT_AUTHENTICATION
and RAILS_ENV
env vars are present and accessible by
the unicorn process.
Keep in mind that a Unicorn reload is not enough for the process to pick up new env vars so a full restart is mandatory.
Development environment setup
- Pipeline development process
- Bug severity
- Feature template (epic)
- Internationalisation (i18n)
- Dependency updates
Development
- Developer Guidelines
- The process of review, test, merge and deploy
- Making a great commit
- Making a great pull request
- Code Conventions
- Database migrations
- Testing and Rspec Tips
- Automated Testing Gotchas
- Rubocop
- Angular and OFN
- Feature toggles
- Stimulus and Turbo
Testing
- Testing process
- OFN Testing Documentation (Handbooks)
- Continuous Integration
- Parallelized test suite with knapsack
- Karma
Releasing
Specific features
Data and APIs
Instance-specific configuration
External services
Design