Skip to content

Instantly share code, notes, and snippets.

@pmoranga
pmoranga / rpm-build-workflow.md
Created April 1, 2017 21:39 — forked from abn/rpm-build-workflow.md
RPM build and hosting workflow using github, travis-ci and copr

RPM Build Flow

This document details simple RPM build flow pattern used to build and host RPM artifacts for open source projects. The below is a visual summary of this flow.

In order to achieve this multiple tools and services are used. The services and their purpose in the flow is as listed below.

Service Purpose
GitHub As is the most common use for GitHub, it holds the build source code. In this case we hold only the spec files and related source files. All other sources, including project binaries/sources are retrieved at build time.
@pmoranga
pmoranga / README.md
Created September 13, 2017 09:10 — forked from blech75/README.md
vagrant_local_status - bash function to display name and status of vagrant machine (for use in PS1)

Vagrant Status in Your Shell Prompt

vagrant_local_status is a Bash function that returns the name and status the relevant Vagrant machine for the current directory.

The primary use case is in your PS1 environment variable, so the status of your current project's Vagrant machine is always visible at every shell prompt. Here's an example of my Bash prompt in a test project dir:

[01:29 PM]-[1506]-[justin@justin]-[~/projects/test]-[dev u= bb/dev @d59dc2d]-[vagrant:poweroff]
$

(vagrant:poweroff is the output of vagrant_local_status)

@pmoranga
pmoranga / docker-compose.yaml
Created November 14, 2017 11:28 — forked from DennyLoko/docker-compose.yaml
TICK stack config
version: "2"
services:
telegraf:
container_name: telegraf
image: mjenz/rpi-telegraf:alpine
restart: always
network_mode: host
pid: host
depends_on:
- influxdb
@pmoranga
pmoranga / 00-set-authorization.groovy
Created November 27, 2017 10:38 — forked from xbeta/00-set-authorization.groovy
put them in $JENKINS_HOME/init.groovy.d/
import jenkins.model.*;
import hudson.security.*;
// JVM did not like 'hypen' in the class name, it will crap out saying it is
// illegal class name.
class BuildPermission {
static buildNewAccessList(userOrGroup, permissions) {
def newPermissionsMap = [:]
permissions.each {
newPermissionsMap.put(Permission.fromId(it), userOrGroup)
version: '3'
services:
portainer:
container_name: portainer
image: portainer/portainer
volumes:
- /srv/docker/portainer:/data
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "9000:9000"
version: '2.1'
services:
grafana:
container_name: grafana
image: raymondmm/grafana
ports:
- 3000:3000
volumes:
- /opt/grafana:/etc/grafana:rw
- /opt/grafana:/var/lib/grafana:rw
@pmoranga
pmoranga / k8s-pi.md
Created December 22, 2019 21:09 — forked from ljfranklin/k8s-pi.md
@pmoranga
pmoranga / 00_readme.md
Created August 12, 2020 17:55 — forked from skinny/00_readme.md
ArgoCD & Kapitan configuration

Using ArgoCD together with Kapitan is actually pretty easy and only requires the kapitan binary in the argo-repo-server and a ConfigManagement plugin in ArgocD (https://argoproj.github.io/argo-cd/user-guide/config-management-plugins/)

1. Edit argocd-cm configmap and add :

  configManagementPlugins: |
    - name: kapitan
      init:
        command: [sh]
        args: ["kapitan-base-compile.sh"]
@pmoranga
pmoranga / 00_readme.md
Created August 13, 2020 07:28 — forked from metacoma/00_readme.md
ArgoCD & Kapitan configuration

Using ArgoCD together with Kapitan is actually pretty easy and only requires the kapitan binary in the argo-repo-server and a ConfigManagement plugin in ArgocD (https://argoproj.github.io/argo-cd/user-guide/config-management-plugins/)

1. Edit argocd-cm configmap and add :

  configManagementPlugins: |
    - name: kapitan
      init:
        command: [sh]
        args: ["kapitan-base-compile.sh"]
@pmoranga
pmoranga / traefik_deployment.yaml
Created May 3, 2021 21:40 — forked from guyromb/traefik_deployment.yaml
Traefik - Streaming Access Logs with JWT decoder using Filebeat
apiVersion: apps/v1
kind: Deployment
spec:
template:
metadata:
annotations:
co.elastic.logs/enabled: "true"
co.elastic.logs/processors.0.decode_json_fields.fields: message
co.elastic.logs/processors.0.decode_json_fields.target: ""
co.elastic.logs/processors.1.dissect.field: request_Authorization