Skip to content

Instantly share code, notes, and snippets.

View alokjani's full-sized avatar

Alok Jani alokjani

  • Ontario
View GitHub Profile
@alokjani
alokjani / gist:d9eda34a1b5ab70a50e8
Last active November 1, 2019 08:15
Howto - Ubuntu 14.04 with Request Tracker and RT for Incident Response

Ubuntu 14.04 Request Tracker RT 4.0.22 RT for Incident Response RTIR 3.0.4

Request Tracker Installation

export http_proxy="http://10.x.x.x:3128"
export https_proxy="http://10.x.x.x.x:3128"
########## Type
##################
Puppet::Type.newtype(:rjil_tempest_config) do
ensurable
newparam(:name, :namevar => true) do
desc 'Section/setting name to manage from tempest.conf'
newvalues(/\S+\/\S+/)
radosgw just works (tested for swift as of now), I am able to create containers and objects. But I see a weird issue on object download using swift client just fails complaining on content length vs readlength mismatch, but at the same time curl just works and I see right content in the downloaded file.
Here is the details
root@ocdb1-testjenkins-puppet-rjil-gate-265:/tmp# swift stat container openrc
Account: v1
Container: container
This is what I did to test consul puppet module
### In consul, any node whether it is agent or server, (other than initial node) need an agent address which is in the cluster in order to join the cluster. This is different from etcd where it allow for autodiscovery.
I Faced couple of issues with consul module.
1. Consul service configuration json is not correct when port parameter specified in consul::service. consul expect that parameter to be integer, but module write it as string. This need to be fixed.
2. If initial server is not up while starting other servers or agent, the cluster join will be failed, and unless there is any (new) service definition, that node will not be joining to the consul cluster, as cluster join code in the module is only called when service restart. I submitted a patch in jiocloud/puppet-consul to fix this.
Added initial server IP in hiera in my env as testing for now.
@alokjani
alokjani / gist:cc5e126c782d0f5c8d3b
Last active August 29, 2015 14:10
Puppet RJIL Vagrant
export https_proxy="http://10.135.x.x:3128/"
export http_proxy="http://10.135.x.x:3128/"
apt-get install git
apt-get install virtualbox
wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb
wget -O puppet.deb http://apt.puppetlabs.com/puppetlabs-release-trusty.deb
@alokjani
alokjani / readme.md
Last active August 8, 2018 12:23
Java on Linux

From Official Binaries

$ wget --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/7u65-b17/jdk-7u65-linux-x64.tar.gz
$ sudo update-alternatives --get-selections | grep ^java
java                           manual   /usr/lib/jvm/java-8-oracle/jre/bin/java
javac                          manual   /usr/lib/jvm/java-8-oracle/bin/javac
#! /bin/bash
echo "Checking to see if the Puppet Labs apt repo needs to be added..."
if [ ! -f /home/vagrant/repos_added.txt ];
then
echo "Adding Puppet Labs apt repository..."
sudo wget -N http://apt.puppetlabs.com/puppetlabs-release-quantal.deb >/dev/null
sudo dpkg -i puppetlabs-release-quantal.deb >/dev/null
echo "Updating apt..."
sudo apt-get update >/dev/null
#!/usr/bin/env bash
# This script will connect to the rest api of the puppetca listed in your
# puppet config and update the local copy certificate revocation list.
#
# This is useful when you have distributed puppet masters fronted by
# a webserver and passenger.
#
# https://docs.puppetlabs.com/guides/rest_api.html#certificate-revocation-list
# https://ask.puppetlabs.com/question/3843/multiple-puppet-masters-with-single-ca-server/
@alokjani
alokjani / sysctl.conf
Last active August 29, 2015 14:15 — forked from kfox/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
make[2]: Leaving directory `/home/vagrant/build/build/packages/contrail'
dh_makeshlibs
dh_shlibdeps
dpkg-shlibdeps: warning: symbol _ZN5boost6system15system_categoryEv used by debian/contrail-lib/usr/lib/libthriftasio.so.0.0.0 found in none of the libraries
dpkg-shlibdeps: warning: symbol _ZTVN6apache6thrift9transport13TMemoryBufferE used by debian/contrail-lib/usr/lib/libthriftasio.so.0.0.0 found in none of the libraries
dpkg-shlibdeps: warning: symbol _ZN5boost6system16generic_categoryEv used by debian/contrail-lib/usr/lib/libthriftasio.so.0.0.0 found in none of the libraries
dpkg-shlibdeps: warning: symbol _ZN6apache6thrift12GlobalOutputE used by debian/contrail-lib/usr/lib/libthriftasio.so.0.0.0 found in none of the libraries
dpkg-shlibdeps: warning: symbol _ZN6apache6thrift7TOutput6printfEPKcz used by debian/contrail-lib/usr/lib/libthriftasio.so.0.0.0 found in none of the libraries
dh_installdeb
debian/rules override_dh_gencontrol