One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| #!/bin/bash | |
| # -*- ENCODING: UTF-8 -*- | |
| # | |
| # ------------------------------------------------------------------ | |
| # [Jorge Andrada Prieto] [jandradap@gmail.com] | |
| # Title: install_docker-ce_redhat7.sh | |
| # Description: instala docker-ce en redhat7 | |
| # recomendable usar CentOS ya que puede ser deprecated en el futuro | |
| # https://docs.docker.com/engine/installation/#server | |
| # https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-from-a-package |
Suponiendo dos servidores con IP's 10.1.0.1 (galera1) y 10.1.0.2 (galera2), la instalación de un cluster MariaDB es bien sencilla.
mariadb-server en nuestros nodos:
apt install mariadb-servermariadb.service en todos los nodos:
systemctl stop mariadb.service/etc/mysql/conf.d/galera.conf con el siguiente contenido (modificando en cada nodo la configuración específica):
| #!/bin/bash | |
| # rename-files.sh Files #Specify Directory Name | |
| #print usage | |
| if [ -z $1 ];then | |
| echo "Usage :$(basename $0) parent-directory" | |
| exit 1 | |
| fi | |
| #process all subdirectories and files in parent directory |
| docker images -a | grep -iv "repo" | grep -v "none" | awk -F " " '{print$1":"$2}' | xargs -t -L1 docker pull | |
| #alias para .bashrc | |
| #alias update_images="docker images -a | grep -iv 'repo' | grep -iv 'none' | awk -F \" \" '{print\$1\":\"\$2}' | xargs -t -L1 docker pull" |
| ## credit: http://fabian-affolter.ch/blog/the-lineinfile-module-of-ansible/ | |
| --- | |
| - hosts: alpine_install | |
| user: root | |
| tasks: | |
| # - name: create a complete empty file | |
| # command: /usr/bin/touch /test/test.conf | |
| - name: create a new file with lineinfile |
| echo "Acquire::Check-Valid-Until false;" > /etc/apt/apt.conf | |
| echo "deb http://archive.debian.org/debian squeeze main contrib non-free" > /etc/apt/sources.list | |
| echo "deb http://archive.debian.org/debian squeeze-lts main contrib non-free" >> /etc/apt/sources.list |
| #======================================= | |
| # Part 1 is Setting up the Mirror Server | |
| # Install CPAN::Mini | |
| $ curl -L http://cpanmin.us | perl - --sudo CPAN::Mini | |
| # Select a CPAN Mirror URL from http://mirrors.cpan.org/ | |
| # - We'll use http://cpan.pair.com | |
| # Pick a directory to mirror to, I'll use /var/www/cpan |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| #!/bin/bash | |
| # -*- ENCODING: UTF-8 -*- | |
| # | |
| # ------------------------------------------------------------------ | |
| # [Jorge Andrada Prieto] [jandradap@gmail.com] | |
| # Title: update_git_repos.sh | |
| # Fecha: 02/11/2018 | |
| # Description: Update all git repos in the path | |
| # If the repositories are https, need to configure user and pass/token: | |
| # |