Skip to content

Instantly share code, notes, and snippets.

View rafabene's full-sized avatar
🏠
Working from home

Rafael Benevides rafabene

🏠
Working from home
View GitHub Profile
@rafabene
rafabene / config.js
Created October 8, 2019 00:19
config.js Magic Mirror
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information how you can configurate this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
@rafabene
rafabene / automation
Created April 6, 2019 21:40
Home assistant
- id: letsencrypt-renewal
alias: Let's Encrypt Renewal
trigger:
- platform: time
at: 00:00:00
action:
- service: hassio.addon_restart
data:
addon: core_letsencrypt
- id: '1551457245407'
$ for A in {01..50}; do mkdir -p /data/pv$A; chmod 777 /data/pv$A; chcon -Rt svirt_sandbox_file_t /data/pv$A; done
$ for A in {01..50}; do
cat <<EOF>> pv.yaml
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: "pv$A"
spec:
capacity:
# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
etcd
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=root
@rafabene
rafabene / Dockerfile
Created May 31, 2016 20:01
Docker che with RHEL and EAP
# JBoss, Home of Professional Open Source
# Copyright 2016, Red Hat, Inc. and/or its affiliates, and individual
# contributors by the @authors tag. See the copyright.txt in the
# distribution for a full listing of individual contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
@rafabene
rafabene / Dockerfile
Last active January 13, 2016 15:11
EAP 6.4 + Ticket-Monster
#From EAP 6.4
FROM registry.access.redhat.com/jboss-eap-6/eap64-openshift
MAINTAINER "Rafael Benevides" <benevides@redhat.com>
ENV USERNAME admin
ENV PASSWORD docker#admin1
#Create admin user
RUN /opt/eap/bin/add-user.sh -u $USERNAME -p $PASSWORD --silent
@rafabene
rafabene / bash
Created December 23, 2015 17:02
Docker swarm build and push
$ docker-compose --x-networking up -d
WARNING:
"wildfly" defines links, which are not compatible with Docker networking and will be ignored.
Future versions of Docker will not support links - you should remove them for forwards-compatibility.
Pulling modcluster (rafabene/mod_cluster:latest)...
aws-swarm-master: Pulling rafabene/mod_cluster:latest... : downloaded
aws-swarm-node-01: Pulling rafabene/mod_cluster:latest... : downloaded
aws-swarm-node-02: Pulling rafabene/mod_cluster:latest... : downloaded
Creating modcluster
@rafabene
rafabene / Instructions
Last active December 17, 2015 01:04
Docker host solution
$ ./swarm-create.sh
$ eval "$(docker-machine env --swarm swarm-master)"
$ docker network create --driver overlay my-swarm-network
$ docker-compose up -d
$ docker exec -ti swarm-node-02/rafaelbenevides_master_1 ping master
PING master (10.0.0.3) 56(84) bytes of data.