This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dom-module id="creer-tache"> | |
<template> | |
<paper-input label="Titre" name="title" value="{{title}}"></paper-input> | |
<paper-input label="Description" name="description" value="{{description}}"></paper-input> | |
<paper-button raised on-click="create">Valider</paper-button> | |
<iron-ajax | |
id="ajax" | |
url="{{url}}" | |
handle-as="json" | |
body='{"title":"{{title}}", "description": "{{description}}"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env http_proxy='10.69.176.185:3128' yum -y install wget git net-tools bind-utils iptables-services bridge-utils bash-completion docker ansible && yum -y update | |
sed -i -e "s/\(^OPTIONS='--selinux-enabled\)/\1 --log-opt max-size=1M --log-opt max-file=3/" /etc/sysconfig/docker | |
docker-storage-setup && systemctl enable docker && systemctl start docker | |
rm -fr ~/.ssh/id_rsa ~/.ssh/id_rsa.pub && ssh-keygen -N '' -f ~/.ssh/id_rsa | |
env https_proxy='10.69.176.185:3128' git clone https://github.com/openshift/openshift-ansible --depth=1 | |
cd openshift-ansible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generer fichier de config | |
docker run -it --rm --entrypoint cat registry:2 \ | |
/etc/docker/registry/config.yml > /data/config.yml | |
# lancer le conteneur | |
docker run -d --restart=always -p 5000:5000 --name v2-mirror -v /data:/var/lib/registry -v /data/config.yml:/etc/docker/registry/config.yml -e HTTP_PROXY registry:2 | |
# tester le conteneur sans tenir compte du certificat self signé | |
curl -kI https://localhost:5000/v2/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM opensuse | |
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added | |
RUN groupadd -r www-data && useradd -r --create-home -g www-data www-data | |
ENV HTTPD_PREFIX /usr/local/apache2 | |
ENV PATH $PATH:$HTTPD_PREFIX/bin | |
RUN mkdir -p "$HTTPD_PREFIX" \ | |
&& chown www-data:www-data "$HTTPD_PREFIX" | |
WORKDIR $HTTPD_PREFIX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir auth | |
docker run --entrypoint htpasswd registry:2 -Bbn testuser testpassword > auth/htpasswd | |
docker run -d -p 5000:5000 --restart=always --name registry \ | |
-v `pwd`/auth:/auth \ | |
-e "REGISTRY_AUTH=htpasswd" \ | |
-e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \ | |
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \ | |
-v `pwd`/certs:/certs \ | |
-e REGISTRY_HTTP_TLS_CERTIFICATE=/etc/pki/tls/certs/self.crt \ | |
-e REGISTRY_HTTP_TLS_KEY=/etc/pki/tls/private/self.key \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p /srv/docker/bind | |
chcon -Rt svirt_sandbox_file_t /srv/docker/bind | |
docker run --name bind -d --restart=always \ | |
--publish 53:53/tcp --publish 53:53/udp --publish 10000:10000/tcp \ | |
--volume /srv/docker/bind:/data \ | |
sameersbn/bind:latest | |
docker exec -it bind /bin/bash | |
DOMAIN=mydev | |
IP=10.0.2.15 | |
cat << EOF >> /etc/bind/named.conf.local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=FR/ST=IDF/L=PARIS/O=RSI/CN=docker.rsi" -keyout /data/domain.key -out /data/domain.crt | |
# https://certbot.eff.org/#centosrhel7-apache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start multiple virtualbox vm headless | |
for i in vm1 vm2 vm3 ; do VBoxManage startvm $i --type headless; done | |
# get ip address for multiple vm | |
# TODO put them in an array | |
for i in vm1 vm2 vm3 ; do VBoxManage guestproperty get $i "/VirtualBox/GuestInfo/Net/0/V4/IP"; done | |
# copy ssh key to multiple vm | |
for i in vm1 vm2 vm3 ; ; do ssh-copy-id -i ~/.ssh/id_rsa.pub root@$i; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#source : http://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/ | |
yum update -y kernel* | |
reboot | |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm | |
yum install -y gcc kernel-devel kernel-headers dkms make bzip2 perl | |
KERN_DIR=/usr/src/kernels/`uname -r` | |
export KERN_DIR | |
mkdir /media/vboxga | |
mount -r /dev/cdrom /media/ /media/vboxga && cd media/vboxga | |
./VBoxLinuxAdditions.run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
HOSTS_CSV=(master1.mydev,master2.mydev,node1.mydev,node2.mydev,node3.mydev) | |
HOSTS=(master1.mydev master2.mydev node1.mydev node2.mydev node3.mydev) | |
DOCKER_HOST=docker.mydev | |
## install prerequistes | |
yum -y install pdsh wget git net-tools bind-utils iptables-services bridge-utils bash-completion ansible | |
yum -y update | |
git clone https://github.com/openshift/openshift-ansible --depth=1 | |
cd openshift-ansible |