Agregando los ultimos detalles a la documentacion y al deployment.
This commit is contained in:
@ -55,22 +55,22 @@ kubectl apply -f ./infrastructure/02-pv-pvc.yaml
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Paso 3: Crear el ConfigMap para el Script de Instalación
|
## Paso 3: Crear el ConfigMap para el Script de Instalación de NVM y Extensiones de VSCode
|
||||||
Define un ConfigMap que contiene un script para instalar Node.js con NVM. Utiliza el archivo [`03-deployment.yaml`](../../infrastructure/03-deployment.yaml).
|
Define un ConfigMap que contiene un script para instalar Node.js con NVM y otro ConfigMap que contiene un json donde se definen las extensiones a instalar. Utiliza el archivo [`03-configmaps.yaml`](../../infrastructure/03-configmaps.yaml).
|
||||||
|
|
||||||
Aplica el archivo con el siguiente comando:
|
Aplica el archivo con el siguiente comando:
|
||||||
```bash
|
```bash
|
||||||
kubectl apply -f ./infrastructure/03-deployment.yaml
|
kubectl apply -f ./infrastructure/03-configmaps.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Paso 4: Crear el Deployment
|
## Paso 4: Crear el Deployment
|
||||||
Define el deployment para el servidor de VS Code utilizando el archivo [`03-deployment.yaml`](../../infrastructure/03-deployment.yaml).
|
Define el deployment para el servidor de VS Code utilizando el archivo [`04-deployment.yaml`](../../infrastructure/04-deployment.yaml).
|
||||||
|
|
||||||
Aplica el archivo con el siguiente comando:
|
Aplica el archivo con el siguiente comando:
|
||||||
```bash
|
```bash
|
||||||
kubectl apply -f ./infrastructure/03-deployment.yaml
|
kubectl apply -f ./infrastructure/04-deployment.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
38
infrastructure/03-configmaps.yaml
Normal file
38
infrastructure/03-configmaps.yaml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: nvm-install-script
|
||||||
|
namespace: vscode-tunnel
|
||||||
|
data:
|
||||||
|
01-nvm.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
# Installing Node.js with NVM
|
||||||
|
sudo curl -O https://raw.githubusercontent.com/creationix/nvm/master/install.sh
|
||||||
|
bash install.sh
|
||||||
|
source ~/.nvm/nvm.sh
|
||||||
|
nvm install --lts
|
||||||
|
nvm alias default lts/*
|
||||||
|
nvm use default && npm install -g yo generator-code
|
||||||
|
nvm use default && npm install -g @vscode/vsce
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: vscode-tunnel-extensions
|
||||||
|
namespace: vscode-tunnel
|
||||||
|
data:
|
||||||
|
extensions.json: |
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"extensionsGroup": {
|
||||||
|
"description": "Extensions of Git",
|
||||||
|
"extensions": [
|
||||||
|
{
|
||||||
|
"name": "Git Graph",
|
||||||
|
"notes": "Extension of Git Graph",
|
||||||
|
"uniqueIdentifier": "mhutchie.git-graph"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
@ -1,20 +1,3 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: nvm-install-script
|
|
||||||
namespace: vscode-tunnel
|
|
||||||
data:
|
|
||||||
01-nvm.sh: |
|
|
||||||
#!/bin/bash
|
|
||||||
# Installing Node.js with NVM
|
|
||||||
sudo curl -O https://raw.githubusercontent.com/creationix/nvm/master/install.sh
|
|
||||||
bash install.sh
|
|
||||||
source ~/.nvm/nvm.sh
|
|
||||||
nvm install --lts
|
|
||||||
nvm alias default lts/*
|
|
||||||
nvm use default && npm install -g yo generator-code
|
|
||||||
nvm use default && npm install -g @vscode/vsce
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@ -60,6 +43,10 @@ spec:
|
|||||||
# mountPath: /usr/bin/custom-scripts/01-nvm.sh
|
# mountPath: /usr/bin/custom-scripts/01-nvm.sh
|
||||||
# subPath: 01-nvm.sh
|
# subPath: 01-nvm.sh
|
||||||
# readOnly: true
|
# readOnly: true
|
||||||
|
# - name: extensions-config
|
||||||
|
# mountPath: /home/extensions.json
|
||||||
|
# subPath: extensions.json
|
||||||
|
# readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: nfs-vol
|
- name: nfs-vol
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
@ -68,3 +55,7 @@ spec:
|
|||||||
# configMap:
|
# configMap:
|
||||||
# name: nvm-install-script
|
# name: nvm-install-script
|
||||||
# defaultMode: 0555
|
# defaultMode: 0555
|
||||||
|
# - name: extensions-config
|
||||||
|
# configMap:
|
||||||
|
# name: vscode-tunnel-extensions
|
||||||
|
# defaultMode: 0444
|
Reference in New Issue
Block a user