Skip to content

Instantly share code, notes, and snippets.

View alokjani's full-sized avatar

Alok Jani alokjani

  • Ontario
View GitHub Profile
@alokjani
alokjani / LPIC-101 400-2
Created November 16, 2020 08:53 — forked from ntwobike/LPIC-101 400-2
Sample questions and answers for LPIC-101-400 part 2
Exam A
QUESTION 1
Which of the following information is stored within the BIOS? (Choose TWO correct answers.)
A. Boot device order
B. Linux kernel version
C. Timezone
D. Hardware configuration
@alokjani
alokjani / LPIC-101 400-1
Created November 16, 2020 08:53 — forked from ntwobike/LPIC-101 400-1
Sample questions for LPIC -101-400 part-1
QUESTION 1
Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?
A. /etc/keys
B. /proc/keys
C. /etc/inittab
D. /proc/inittab
E. /etc/reboot
QUESTION 2
Which of the following information is stored within the BIOS? (Choose TWO correct answers.)
(venv)vagrant@aasemble-build:~/20160627/python-aasemble.django$ tail -f celery_logs.log -n50
override_env={'GNUPGHOME': self.reposity_signature_driver.get_default_gpghome()})
File "/home/vagrant/20160627/python-aasemble.django/aasemble/utils/__init__.py", line 77, in run_cmd
stderr=stderr_arg, cwd=cwd, env=environ)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[2016-06-27 12:18:34,036: ERROR/MainProcess] Task aasemble.django.apps.buildsvc.tasks.export[46609229-ff57-4ca2-a88f-32e87d0ff171] raised unexpected: OSError(2, 'No such file or directory')
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
@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
#!/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/
#! /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
@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
@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
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.