CREATE PROXY
ssh -D 9000 -q -C -N -f bridge_host.domain.tld
SETUP SSH (add this in ~/.ssh/config)
Host target.host.domain.tld
ProxyCommand=nc -X 5 -x localhost:9000 %h %p
CONNTECT TO SSH HOST target.host.domain.tld
ssh -l user target.host.domain.tld
CREATE PROXY
ssh -D 9000 -q -C -N -f bridge_host.domain.tld
SETUP SSH (add this in ~/.ssh/config)
Host target.host.domain.tld
ProxyCommand=nc -X 5 -x localhost:9000 %h %p
CONNTECT TO SSH HOST target.host.domain.tld
ssh -l user target.host.domain.tld
Sometimes I need/have to sync a private repository with a public one, so this is what I usually do.
Add a new remote
git remote add github https://github.com/elastic/ansible-elasticsearch.git
Pull the new commits from master
git pull github master
Push new commits to origin
git push origin master
Push new tags
git push --tags origin
If you want/need to keep your python packages updated and you are using pip requirements you can use pip-upgrader to check the latest version of all your dependencies and upgrade them if needed it and don’t forget to use virtual environments
Happy Coding!
En esta tercera parte de Apache MESOS & Centos 6 está enfocada en posibilitar el uso de linux containers en mesos utilizando el framework marathon y dockers.
Primero debemos instalar python2.7 para poder instalar luego deimos.
Primero debemos instalar algunas dependencias
yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
yum install -y bzip2-devel
wget https://www.python.org/ftp/python/2.7.7/Python-2.7.7.tar.xz
xz -d Python-2.7.7.tar.xz
tar -xvf Python-2.7.7.tar
cd Python-2.7.7
./configure --prefix=/usr/local
make
make altinstall
export PATH="/usr/local/bin:$PATH"
curl -O http://python-distribute.org/distribute_setup.py
python2.7 distribute_setup.py
easy_install-2.7 pip
pip2.7 install deimos
Cuando revisamos el log de docker podemos encontrar un mensaje diciendo que la versión de docker es inestable debido a la versión del kernel que estamos usando, a continuación actualizaremos el kernel a la última versión que esta disponible en el repositorio elrepo
yum install http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel kernel-ml-headers
Además debemos agregar (cgroup_enable=memory swapaccount=1 selinux=0) en
/boot/grub/menu.lst
title CentOS (3.15.3-1.el6.elrepo.x86_64)
root (hd0,0)
kernel /vmlinuz-3.15.3-1.el6.elrepo.x86_64 ro root=UUID=03b47cb3-1cad-4bad-9fbf-6baecb8c0e9b console=hvc0 crashkernel=auto SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us cgroup_enable=memory swapaccount=1 selinux=0
initrd /initramfs-3.15.3-1.el6.elrepo.x86_64.img
Finalmente una vez que se reinicie la máquina estaremos utilizando la version 3.15.x del kernel. La próxima guÃa mostrará como enviar un proceso al kernel distribuido mesos vÃa marathon utilizando containers dockers.
If you need a python module in your nitrous.io’s box try with
pip install --user requests
Hace un par de semanas llegó mi raspberry pi de 700mhz y 256MB de RAM. La compré principalmente para configurar un sistema de descargas utilizando los discos usb que tengo. Actualmente esta corriendo la versión de debian disponible en la sección Downloads del sitio oficial de Raspberry. La instalación del OS fue muy simple fue sólo utilizar el comando/software dd para copiar la imagen a mi memoria SD de 16 GB, luego conectar todo , iniciar (conectando el cable de poder) e ingresar via ssh utilizando el user y password por defecto del sistema.
Descargar torrent
Para descargar torrent utilizo el cliente transmission (transmission-daemon utilizando la interfaz web). Para ello utilizamos apt-get.
sudo apt-get install transmission
Para configurar este cliente debemos editar un archivo que se encuentra en /etc/transmission-daemon/settings.json
sudo vim /etc/transmission-daemon/settings.json
Algunos datos de mi configuración son:
"incomplete-dir": "/shared/tmps",
"incomplete-dir-enabled": true,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-limit-global": 240,
"peer-limit-per-torrent": 60,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": false,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 1,
"ratio-limit-enabled": true,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false,
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/home/pi/scripts/download_complete.sh"
Para ejecutar un script cuando se termine la descarga de un torrent
"script-torrent-done-filename": "/home/pi/scripts/download_complete.sh"
Para permitir manejar transmission en forma remota utilizando el protocolo RPC
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-port": 9091,
Luego para reinciar el transmission.
sudo invoke-rc.d transmission-daemon reload
Ahora podemos ingresar a http://ip_raspberry:9091 (por defecto el usuario es tranmission y el password transmission). Y ya podremos comenzar a descargar torrents.
En los próximos post mostraré como configurar flexget. Este programa se encarga de revisar si hay nuevos torrents (via RSS) y los agrega en forma automática a transmission.