Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
root | 875829d4be | 4 years ago |
10 changed files with 31 additions and 9 deletions
@ -1,4 +1,4 @@ |
|||
#!/bin/bash |
|||
[ `id -u` -ne 0 ] && exit 1 |
|||
test -f /root/.ssh/id_rsa.pub || ssh-keygen -t rsa -b 4096 -N '' -f /root/.ssh/id_rsa |
|||
ansible-playbook -i inventory/hosts --skip-tags swarm --diff -v swarm-galera.yml |
|||
ansible-playbook -i inventory/hosts --tags configuration --diff -v swarm-galera.yml |
|||
|
@ -1,5 +1,5 @@ |
|||
#!/bin/bash |
|||
docker stack rm stack |
|||
lxc-stop --name worker1; lxc-stop --name worker2 |
|||
docker node rm worker1; docker node rm worker2 |
|||
rm -rf /var/lib/lxc/worker* |
|||
docker node rm worker1; docker node rm worker2 |
|||
|
@ -0,0 +1,13 @@ |
|||
FROM ubuntu:16.04 |
|||
RUN apt-get update |
|||
RUN apt-get install -y software-properties-common wget |
|||
RUN wget https://mariadb.org/mariadb_release_signing_key.asc -O - | apt-key add - |
|||
RUN add-apt-repository "deb [arch=amd64,arm64,i386,ppc64el] http://mirrors.coreix.net/mariadb/repo/10.4/ubuntu xenial main" |
|||
RUN apt-get update |
|||
RUN apt install -y rsync mariadb-server-10.4 galera-4 mariadb-client-10.4 |
|||
COPY galera.cnf /etc/mysql/conf.d/galera.cnf |
|||
#RUN echo "wsrep_node_address=`ip a s eth0|grep inet|head -1|awk '{print $2}'|cut -d "/" -f 1`" >> /etc/mysql/conf.d/galera.cnf |
|||
RUN chown -R mysql:mysql /etc/mysql |
|||
RUN chmod -R go-w /etc/mysql |
|||
EXPOSE 3306 4444 4567 4568 |
|||
#ENTRYPOINT ["mysqld","{{ extra_docker_options }}"] |
@ -0,0 +1,5 @@ |
|||
FROM mariadb:10.4 |
|||
COPY galera.cnf /etc/mysql/conf.d/my.cnf |
|||
RUN chown -R mysql:mysql /etc/mysql |
|||
RUN chmod -R go-w /etc/mysql |
|||
EXPOSE 3306 4444 4567 4568 |
Loading…
Reference in new issue