Skip to content

Instantly share code, notes, and snippets.

@chromko
chromko / monzo-alertmanager-config.yaml
Created August 27, 2019 15:41 — forked from milesbxf/monzo-alertmanager-config.yaml
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prom-prometheus-server
access: proxy
isDefault: true
rbac:
create: false
alertmanager:
## If false, alertmanager will not be installed
##
enabled: false
pushgateway:
enabled: false
https://rock-it.pl/how-to-write-excellent-dockerfiles/
https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ - Best Practices
http://www.projectatomic.io/docs/docker-image-author-guidance/ - доп. советы от авторов atomic по написанию Dockerfile-ов
https://github.com/lukasmartinelli/hadolint - линтер Dockerfile-ов
credentials {
{% for credential_name, credential_value in jenkins_system_credentials %}
{{credential_name | replace("-","_")}}: {
type = "{{credential_value.type}}"
credentialsId = "{{credential_value.credentialsid}}"
description = "{{credential_value.description}}"
userId = "{{credential_value.userid}}"
{% if credential_value.value is defined %}
value = "credential_value.value"
{% endif %}
@chromko
chromko / RBAC_Grants.groovy
Last active June 14, 2019 06:14
Add Jenkins RBAC roles and assign them
import hudson.model.*
import hudson.security.*
import jenkins.*
import jenkins.model.*
import java.util.*
import com.michelin.cio.hudson.plugins.rolestrategy.*
import java.lang.reflect.*
RoleBasedAuthorizationStrategy roleBasedAuthenticationStrategy = Hudson.instance.getAuthorizationStrategy()
rbac:
create: false
alertmanager:
## If false, alertmanager will not be installed
##
enabled: false
# Defines the serviceAccountName to use when `rbac.create=false`
serviceAccountName: default
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
sudo bash -c 'echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" > /etc/apt/sources.list.d/mongodb-org-3.2.list'

Keybase proof

I hereby claim:

  • I am chromko on github.
  • I am chromko (https://keybase.io/chromko) on keybase.
  • I have a public key ASAEqMpUYFJYN6WbCCEa8a6nPRkRlNTeir0e1QpYDbk8Wwo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am chromko on github.
* I am chromko (https://keybase.io/chromko) on keybase.
* I have a public key ASAEqMpUYFJYN6WbCCEa8a6nPRkRlNTeir0e1QpYDbk8Wwo
To claim this, I am signing this object: