- IAAS (infrastructure as a service) : Permet de monter des machines, c'est de la VM, de l'automatisation. On déplacait l'infrastructure.
- CAAS (container as a service) : Virtualisation non plus par VM mais par containers tel que Docker. Les fournisseurs peuvent fournir des plateformes d'orchestration dont Google Kubernetes ou Docker Swarm. PAAS (platform as a service) : google app engine, amazon S3, etc, ce sont des sevices managés
- BAAS (backend as a service) : Ce n'est pas un service de cloud mais un concept d'architecture qui fournit l'authentification, la scalabilité automatique, et des services tels que les push notifications pour le développement d'app mobile.
- FAAS (functions as a service) : La plate-forme qui instancie à la volée une fonction lors d'un appel d'API. On ne paie plus en nombre de machine ou autre mais au nombre d'appels d'API
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
declare -a MYARRAY | |
# Static index | |
MYARRAY[0]="first value" | |
# Dynamic index | |
MYARRAY[${i}]="another value" | |
# Access an element of an array | |
echo "Hello my value is ${MYARRAY[$i]}" |
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
# While loop | |
while [ $i -lt 10 ]; | |
do | |
[...] | |
done | |
# C style for loop | |
for (( c=1; c<=$MAX_VAL; c++ )) | |
do | |
[...] |
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
## check the return of a command | |
if command; then | |
[...] | |
fi | |
## check by string comparison / numerical / file existence / or more | |
if [[ CHECK ]]; then | |
[...] | |
fi |
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
const getAsync = util.promisify(client.get).bind(client); | |
const keysAsync = util.promisify(client.keys).bind(client); | |
app.get('/notes', async function (req, res, next) { | |
var promises = []; | |
await keysAsync('*').then(function (keys) { | |
console.log("got "+ keys) | |
keys.forEach(function (key) { | |
console.log(key); |
un VPC permet de créer un réseau virtuel et de la configurer. C'est une isolation logique. On distingue subnet public avec IP accessible et subnet privée qui a besoin d'une NAT gateway. Terraform est un outil créé par Hashicorp qui fait de l'infra as code. On fait du déclaratif, et terraform se charge de monter/démonter les machines pour nous. Il est compatible multicloud et pas seulement AMAZON.
A l'initialisation, on commence par un
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
[user] | |
name = Benjamin Chenebault | |
email = [email protected] | |
[push] | |
default = simple | |
[alias] | |
cp = cherry-pick | |
st = status -s | |
cl = clone | |
ci = commit |
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
// This method preserves mongo indexes | |
db.getCollectionNames().forEach(function(collname) { | |
db[collname].remove({}) | |
}) |
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
sudo gitlab-runner register --tag-list "docker" --docker-volumes "/var/run/docker.sock:/var/run/docker.sock" \ | |
--url "https://gitlab.mycompany.com/" --registration-token "Y1riedimjQuJ-rBK-SHe" --executor "docker" \ | |
--description "ci1-docker-temp" --docker-image "docker:stable" --docker-privileged |
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
# Create a bootable arch key and boot on it | |
# load your keymap | |
loadkeys fr | |
# connect to internet | |
iwclt | |
> station wlan0 scan | |
> station wlan0 connect SSID |
OlderNewer