Nombre total de pages vues

jeudi 4 août 2016

Debian 8 : Afficher la sequence de démarrage | Enable verbose startup system


Par défaut Debian 8 ne montre pas les services démarrés au Boot du  système, cela peut être gênant
si vous essayer de configurer un script qui ne démarrage pas.
Avec ce mode, vous pouvez de voir ce qui ce passe !

By default Debian 8 does not show the services started at boot system, it can be annoying if you try to configure a script that does not start.
In this mode, you can see what happens!

Installer Ansible 2.0 sous Debian 8 | How To install Ansible 2.0 Debian 8 Jessie


Voici une façon rapide d'installer Ansible 2.0 via les sources Tarball (tar.gz)
Here is a quick method of installing Ansible 2.0 source tarball (tar.gz)

Prérequis être root ou avoir les droits root.
Prerequisites be root or have root privileges.


# apt-get update && apt -y install python-pip python-dev build-essential libssl-dev libffi-dev sudo
# pip install PyYAML && pip install jinja2 && pip install --upgrade setuptools
# pip install paramiko --upgrade && pip install --upgrade pyasn1

*** Download Ansible

# cd /tmp/
# wget http://releases.ansible.com/ansible/ansible-2.0.0.0.tar.gz
# tar xzfv ansible-2.0.0.0.tar.gz
cd ansible-2.0.0.0 && make && make install

*** TEST ANSIBLE

# ansible localhost -m ping

localhost | SUCCESS => {
    "changed": false,
    "ping": "pong"
}


# ansible --version
ansible 2.0.0.0
  config file =
  configured module search path = Default w/o overrides

mercredi 25 mai 2016

Docker Command-Line | Pense-bête | Reminder




     Voici une liste des commandes rapide pour Docker.
     Here is a quick list of commands for Docker.
     ---------------------------------------------------------------------------------
   
    # Run a container
    docker run ubuntu /bin/echo "Hello word"


    # Running an interactive shell
    docker run -i -t ubuntu /bin/bash
  
    # Start Container as a daemon
    docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done"
  
    # Show container running
    docker ps
  
    # nat port-Host -> Container
    docker run -d -p 80:5000 training/webapp python app.py
  
    # Show container logs
    docker logs -f name_container
  
    # container top
    docker top name_container
  
    # Remove container
     docker rm name_container
    
    # Start Stop container
    docker stop / start name_container
  
    # Listing images on the host
    docker images
  
    # Download images
    docker pull centos
  
    # Docker search images
    docker search sinatra
  
    # Updating and committing an image
     docker commit -m "Added json gem" -a "Kate Smith" 0b2616b0e5a8 ouruser/sinatra:v2
    
    # Set name container
    docker run -d -P --name web training/webapp python app.py
  
    # Show networks
    docker network ls
       
    # Create Bridge network
    docker network create -d bridge my-bridge-network
  
    # Show network detail
    docker network inspect my-bridge-network
    docker inspect --format='{{json .NetworkSettings.Networks}}' name_container
  
    # Show IP address Container
    docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' web
  
    # Connect networks
    docker network connect my-bridge-network web


    # Attach Container to network
    docker network connect my-bridge-network web

   # Adding a data volume
   docker run -d -P --name web -v /webapp training/webapp python app.py

 # Mount a host directory as a data volume
  docker run -d -P --name web -v /src/webapp:/webapp training/webapp python app.py