Skip to content

Instantly share code, notes, and snippets.

View nuriel77's full-sized avatar

Nuriel Shem-Tov nuriel77

View GitHub Profile
@nuriel77
nuriel77 / doDomainSnapshot.py
Created April 23, 2017 10:45
Do libvirt snapshot for domain and define how many recent snapshots to keep
#!/usr/bin/env python
import argparse
import libvirt
import logging
import time
import sys
import os
from pprint import pformat
from heapq import nlargest
@nuriel77
nuriel77 / hornet.conf
Created April 16, 2020 20:52
hornet nginx configs
upstream hornet_dashboard {
server 127.0.0.1:8087;
}
# Rate limit requestsi
limit_req_zone $binary_remote_addr zone=hornet_dashboard:2m rate=10r/s;
server {
limit_req zone=hornet_dashboard burst=25;
listen 8081 default_server ssl http2;
@nuriel77
nuriel77 / hornet.conf
Last active February 6, 2020 20:42
hornet dashboard config example nginx
upstream hornet_dashboard {
server 127.0.0.1:8087;
}
# Rate limit requestsi
limit_req_zone $binary_remote_addr zone=hornet_dashboard:2m rate=10r/s;
server {
limit_req zone=hornet_dashboard burst=25;
listen 8081 default_server ssl http2;
@nuriel77
nuriel77 / Dockerfile
Created January 11, 2020 08:38
Can be used for any arch based on --build-args
FROM alpine:latest
WORKDIR /app
LABEL org.label-schema.description="HORNET - The IOTA community node"
LABEL org.label-schema.name="gohornet/hornet"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.vcs-url="https://github.com/gohornet/hornet"
LABEL org.label-schema.usage="https://github.com/gohornet/hornet/blob/master/DOCKER.md"
ARG ARCH=x86_64
# Build image
FROM node:10-alpine AS build
RUN apk --no-cache add --update \
g++ \
gcc \
libgcc \
libstdc++ \
make \
python && \
npm install --quiet node-gyp -g
@nuriel77
nuriel77 / cinder-check-service.py
Created April 13, 2017 13:01
Check cinder services via Python API bindings
#!/usr/bin/env python
import argparse
import os
import sys
from keystoneauth1 import loading
from keystoneauth1 import session
from cinderclient import client
def get_client(args):
@nuriel77
nuriel77 / undercloud-playbook.yaml
Last active August 21, 2018 14:56
Ansible playbook to initialize new undercloud for tripleo
#
# Ansible playbook to prepare the undercloud machine.
# Will preform all steps until custom steps are to be taken --
# which are: providing a custom undercloud.conf and running
# openstack install undercloud command and so on...
# Root SSH access to the remote machine has to be configured.
# Edit vars as necessary.
#
# If this is the first time you are using Ansible on a host,
@nuriel77
nuriel77 / default
Created May 24, 2018 21:01
nginx-default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
# Create a file with:
export DIB_DHCP_TIMEOUT=75
export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean*"
export DIB_YUM_REPO_CONF="$DIB_YUM_REPO_CONF /etc/yum.repos.d/CentOS-Ceph-Jewel.repo"
export STABLE_RELEASE="newton"
openstack overcloud image build --all
# Run above file (in screen)
# Then:
@nuriel77
nuriel77 / gist:fc02d1a8da8289e7d96c436b2443b09f
Last active March 17, 2018 00:29
example install apach2 php7.0
### INSTALL COMMAND:
root@test001:/home/ubuntu# apt-get -y install apache2 php7.0 libapache2-mod-php7.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libgd3 libjbig0 libtiff5 libvpx3 libxslt1.1
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
apache2-bin apache2-data libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 php-common php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline