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
| # Set default region and zone | |
| gcloud config set compute/region europe-west1 | |
| gcloud config set compute/zone europe-west1-b | |
| # Create an instance template | |
| gcloud compute instance-templates create lb-backend-template \ | |
| --region=europe-west1 \ | |
| --network=default \ | |
| --subnet=default \ | |
| --tags=allow-health-check \ |
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
| <!doctype html> | |
| <html lang="es"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width,initial-scale=1" /> | |
| <title>Ejemplo: index.html con CSS y JS</title> | |
| <style> | |
| /* CSS embebido: estilos simples */ | |
| :root{ | |
| --bg: #f7f9fc; |
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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| ############# PARÁMETROS EDITABLES ############# | |
| REGION="${REGION:-us-east-1}" # cambia si quieres | |
| INSTANCE_TYPE="${INSTANCE_TYPE:-t3.small}" # barato y suficiente p/HTTP | |
| SPOT_MAX_PRICE="${SPOT_MAX_PRICE:-}" # vacío = precio spot on-demand cap (recomendado) | |
| SECURITY_GROUP_NAME="${SECURITY_GROUP_NAME:-spot-http-stress-sg}" | |
| IAM_ROLE_NAME="${IAM_ROLE_NAME:-EC2SpotStressS3Role}" | |
| INSTANCE_PROFILE_NAME="${INSTANCE_PROFILE_NAME:-EC2SpotStressS3Profile}" |
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
| # Download and install the Microsoft signing key | |
| curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
| sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg | |
| # Add to software repository | |
| sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs)-prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list' | |
| # Update repository information and install package | |
| sudo apt-get update | |
| sudo apt-get install azure-functions-core-tools-4 -y |
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
| # Get packages needed for the installation process | |
| sudo apt-get update | |
| sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg -y | |
| # Download and install the Microsoft signing key | |
| sudo mkdir -p /etc/apt/keyrings | |
| curl -sLS https://packages.microsoft.com/keys/microsoft.asc | | |
| gpg --dearmor | | |
| sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null | |
| sudo chmod go+r /etc/apt/keyrings/microsoft.gpg |
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 apt install ntpdate -y | |
| sudo ntpdate time.nist.gov | |
| date |
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 apt update | |
| sudo apt install python3 -y | |
| python3 -V | |
| which python3 | |
| sudo apt install python3-pip -y | |
| pip3 -V | |
| which pip3 |
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 apt update | |
| sudo apt install -y curl | |
| curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash | |
| nvm install node | |
| nvm install 18.19.0 | |
| nvm list | |
| nvm use 18.19.0 |
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 apt update | |
| sudo apt install -y python2 | |
| python2 --version | |
| which python2 |
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 apt update | |
| sudo apt install -y openjdk-18-jdk | |
| sudo apt install -y openjdk-18-jre | |
| export JAVA_HOME=/usr/lib/jvm/java-18-openjdk-amd64 | |
| echo $JAVA_HOME |