Changes for Caen University (France)

This commit is contained in:
Julien Girardin
2020-01-13 17:29:02 +01:00
parent dcd0c3e189
commit b53e3f84df
6 changed files with 46 additions and 15 deletions

View File

@@ -8,11 +8,14 @@ RUN apt-get update && apt-get install -y \
groff \
jq \
less \
locales \
man \
pssh \
python \
python3 \
python-docutils \
python-pip \
python3-pip \
ssh \
unzip \
wkhtmltopdf \
@@ -20,6 +23,14 @@ RUN apt-get update && apt-get install -y \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Set the locale
RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_GB.UTF-8
ENV LANG en_GB.UTF-8
ENV LC_ALL en_GB.UTF-8
ARG TERRAFORM_VERSION=0.11.13
RUN curl -s https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
-o terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
@@ -28,12 +39,16 @@ RUN curl -s https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraf
&& rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip
RUN pip install \
RUN pip install -U \
awscli \
jinja2 \
pdfkit \
PyYAML \
termcolor
termcolor \
&& pip3 install -U \
jinja2 \
pdfkit \
PyYAML
RUN mv $(which wkhtmltopdf) $(which wkhtmltopdf).real
COPY lib/wkhtmltopdf /usr/local/bin/wkhtmltopdf

View File

@@ -7,6 +7,8 @@ services:
working_dir: /root/prepare-vms
volumes:
- $HOME/.aws/:/root/.aws/
- $HOME/.ssh/:/root/.ssh/
- $HOME/.config/openstack:/root/.config/openstack
- $SSH_AUTH_SOCK:$SSH_AUTH_SOCK
- $PWD/:/root/prepare-vms/
environment:
@@ -16,4 +18,4 @@ services:
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}
AWS_INSTANCE_TYPE: ${AWS_INSTANCE_TYPE}
USER: ${USER}
entrypoint: /root/prepare-vms/workshopctl
# entrypoint: /root/prepare-vms/workshopctl

View File

@@ -264,6 +264,18 @@ EOF"
sep "Done"
}
_cmd minikube "Install kind to optionnaly transform a docker machine in a small kube cluster"
_cmd_minikube() {
TAG=$1
need_tag
pssh --timeout 200 "
sudo curl -L https://github.com/kubernetes/minikube/releases/download/v1.6.2/minikube-linux-amd64 -o /usr/local/bin/minikube
sudo chmod +x /usr/local/bin/minikube
sudo minikube config set vm-driver none
"
}
_cmd kubereset "Wipe out Kubernetes configuration on all nodes"
_cmd_kubereset() {
TAG=$1

View File

@@ -27,4 +27,6 @@ compose_version: 1.24.1
machine_version: 0.15.0
# Password used to connect with the "docker user"
docker_user_password: training
docker_user_password: Unicaen
url: https://intro-2019-12.container.training/

View File

@@ -1,5 +1,5 @@
resource "openstack_compute_instance_v2" "machine" {
count = "${var.count}"
count = "${var.count}"
name = "${format("%s-%04d", "${var.prefix}", count.index+1)}"
image_name = "Ubuntu 16.04.5 (Xenial Xerus)"
flavor_name = "${var.flavor}"

View File

@@ -1,13 +1,13 @@
provider "openstack" {
user_name = "${var.user}"
tenant_name = "${var.tenant}"
domain_name = "${var.domain}"
password = "${var.password}"
auth_url = "${var.auth_url}"
# user_name = "${var.user}"
# tenant_name = "${var.tenant}"
# domain_name = "${var.domain}"
# password = "${var.password}"
# auth_url = "${var.auth_url}"
}
variable "user" {}
variable "tenant" {}
variable "domain" {}
variable "password" {}
variable "auth_url" {}
#variable "user" {}
#variable "tenant" {}
#variable "domain" {}
#variable "password" {}
#variable "auth_url" {}