Skip to content

Instantly share code, notes, and snippets.

View stephaneerard's full-sized avatar

Stéphane Erard stephaneerard

  • Pragmatism & Enthusiasm
  • Nice, France
View GitHub Profile
git clone git@github.com:French-Exception-2/vagranti-dev.php.git vagranti-dev.php.git
https://github.com/French-Exception-2/vagranti-dev.php/blob/develop/provisioning/Debian_64/10.7.0/k8s.install.sh
https://github.com/French-Exception-2/vagranti-dev.php/blob/develop/provisioning/Debian_64/10.7.0/k8s.configure.sh
==> vdi-01-dev-worker-01: Running provisioner: k8s.configure (shell)...
vdi-01-dev-worker-01: Running: script: k8s.configure
vdi-01-dev-worker-01: [preflight] Running pre-flight checks
vdi-01-dev-worker-01: [WARNING SystemVerification]: missing optional cgroups: hugetlb
vdi-01-dev-worker-01: [preflight] Reading configuration from the cluster...
<?php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class InitCommand extends Command
{
#!/usr/bin/env bash
k_iface=${k_iface:=enp0s8}
k_apiserver_advertise_address=${k_apiserver_advertise_address:=$(ip addr show $k_iface | grep -Po 'inet \K[\d.]+')}
k_pod_network_cidr=${k_pod_network_cidr:="172.18.0.0/16"}
ROLE=${ROLE:="master"}
sudo swapoff -a
if [[ $MASTER == $(hostname) ]]; then
#!/usr/bin/env bash
k_apiserver_advertise_address=${k_apiserver_advertise_address:=$(ip addr show $k_iface | grep -Po 'inet \K[\d.]+')}
k_pod_network_cidr=${k_pod_network_cidr:="172.18.0.0/16"}
sudo swapoff -a
if [[ $MASTER == $(hostname) ]]; then
(rm /vagrant/instance/$MASTER/k8s.join.command.create.sh) || true
sudo kubeadm init --apiserver-advertise-address=${k_apiserver_advertise_address} --pod-network-cidr=${k_pod_network_cidr}
vagrant@cc-dcmp-dev-infra-00:~/code/dcmp-api/dcmp-api-i1$ composer require behat/behat behat/mink behat/mink-extension laracasts/behat-laravel-extension symfony/config --dev -W
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-(
Using version ^3.8 for behat/behat
Using version ^1.8 for behat/mink
Using version ^2.3 for behat/mink-extension
Using version ^1.1 for laracasts/behat-laravel-extension
Using version ^5.2 for symfony/config
./composer.json has been updated
Running composer update behat/behat behat/mink behat/mink-extension laracasts/behat-laravel-extension symfony/config --with-all-dependencies
Loading composer repositories with package information
version: '3.3'
services:
traefik:
image: "traefik"
container_name: "traefik"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
version: '3.3'
services:
traefik:
image: "traefik:v2.3"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
@stephaneerard
stephaneerard / .ps1
Last active December 14, 2020 10:19
$npm = @("config-lib", "config-api", "config-cli")
try {
$processes = foreach ($package in $npm) {
Start-Process -FilePath powershell -ArgumentList 'npm run watch' -WorkingDirectory "$psscriptroot\..\src\$package" -nonewwindow
}
$processes | Wait-Process
}
finally {
$npm = @("config-lib", "config-api", "config-cli")
$processes = [System.Collections.ArrayList]@()
$location = get-location
try {
foreach ($package in $npm) {
set-location $psscriptroot\..\src\$package
$process = ./node_modules/.bin/tsc --watch &
vagrant@infra:~$ sudo ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:50:a7:ad:75 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500