Merge pull request #324 from manuelver/feature/translateES-11

This commit is contained in:
Michael Cade 2023-02-18 17:38:58 +00:00 committed by GitHub
commit c1b6a8303b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 290 additions and 292 deletions

View File

@ -1,181 +1,179 @@
## Microsoft Azure Storage Models
## Modelos de almacenamiento de Microsoft Azure
### Storage Services
### Servicios de almacenamiento
- Azure storage services are provided by storage accounts.
- Storage accounts are primarily accessed via REST API.
- A storage account must have a unique name that is part of a DNS name `<Storage Account name>.core.windows.net`
- Various replication and encryption options.
- Sits within a resource group
- Los servicios de almacenamiento de Azure se proporcionan mediante cuentas de almacenamiento.
- A las cuentas de almacenamiento se accede principalmente a través de la API REST.
- Una cuenta de almacenamiento debe tener un nombre único que forme parte de un nombre DNS `<Nombre de la cuenta de almacenamiento>.core.windows.net`.
- Varias opciones de replicación y cifrado.
- Se encuentra dentro de un grupo de recursos
We can create our storage group by simply searching for Storage Group in the search bar at the top of the Azure Portal.
Podemos crear nuestro grupo de almacenamiento simplemente buscando Storage Group en la barra de búsqueda de la parte superior del Azure Portal.
![](Images/Day32_Cloud1.png)
We can then run through the steps to create our storage account remembering that this name needs to be unique and it also needs to be all lower case, with no spaces but can include numbers.
A continuación, podemos ejecutar los pasos para crear nuestra cuenta de almacenamiento recordando que este nombre tiene que ser único y también tiene que ser todo en minúsculas, sin espacios, pero puede incluir números.
![](Images/Day32_Cloud2.png)
We can also choose the level of redundancy we would like against our storage account and anything we store here. The further down the list the more expensive option but also the spread of your data.
También podemos elegir el nivel de redundancia que queremos para nuestra cuenta de almacenamiento y para todo lo que guardemos aquí. Cuanto más abajo de la lista más cara es la opción, pero también la dispersión de sus datos.
Even the default redundancy option gives us 3 copies of our data.
Incluso la opción de redundancia por defecto nos da 3 copias de nuestros datos.
[Azure Storage Redundancy](https://docs.microsoft.com/en-us/azure/storage/common/storage-redundancy)
Summary of the above link down below:
Resumen del enlace anterior:
- **Locally-redundant storage** - replicates your data three times within a single data centre in the primary region.
- **Geo-redundant storage** - copies your data synchronously three times within a single physical location in the primary region using LRS.
- **Zone-redundant storage** - replicates your Azure Storage data synchronously across three Azure availability zones in the primary region.
- **Geo-zone-redundant storage** - combines the high availability provided by redundancy across availability zones with protection from regional outages provided by geo-replication. Data in a GZRS storage account is copied across three Azure availability zones in the primary region and is also replicated to a second geographic region for protection from regional disasters.
- **Almacenamiento redundante local**: replica los datos tres veces en un único centro de datos de la región primaria.
- **Almacenamiento georredundante**: copia los datos de forma sincrónica tres veces en una única ubicación física de la región principal mediante LRS.
- **Almacenamiento redundante en zonas**: replica los datos de Azure Storage de forma sincrónica en tres zonas de disponibilidad de Azure en la región principal.
- **Almacenamiento georredundante**: combina la alta disponibilidad proporcionada por la redundancia entre zonas de disponibilidad con la protección contra interrupciones regionales proporcionada por la georreplicación. Los datos de una cuenta de almacenamiento GZRS se copian en tres zonas de disponibilidad de Azure en la región principal y también se replican en una segunda región geográfica para protegerlos de desastres regionales.
![](Images/Day32_Cloud3.png)
Just moving back up to performance options. We have Standard and Premium to choose from. We have chosen Standard in our walkthrough but premium gives you some specific options.
Volviendo a las opciones de rendimiento. Podemos elegir entre Estándar y Premium. Hemos elegido Estándar en el tutorial, pero Premium te da algunas opciones específicas.
![](Images/Day32_Cloud4.png)
Then in the drop-down, you can see we have these three options to choose from.
A continuación, en el menú desplegable, puedes ver que tenemos estas tres opciones para elegir.
![](Images/Day32_Cloud5.png)
There are lots more advanced options available for your storage account but for now, we do not need to get into these areas. These options are around encryption and data protection.
Hay muchas más opciones avanzadas disponibles para su cuenta de almacenamiento, pero por ahora, no necesitamos entrar en estas áreas. Estas opciones están relacionadas con el cifrado y la protección de datos.
### Managed Disks
### Discos gestionados
Storage access can be achieved in a few different ways.
El acceso al almacenamiento puede realizarse de varias formas.
Authenticated access via:
Acceso autenticado mediante:
- Una clave compartida para un control total.
- Firma de acceso compartido para un acceso delegado y granular.
- Azure Active Directory (cuando esté disponible)
- A shared key for full control.
- Shared Access Signature for delegated, granular access.
- Azure Active Directory (Where Available)
Acceso público:
- El acceso público también se puede conceder para permitir el acceso anónimo, incluso a través de HTTP.
- Un ejemplo de esto podría ser alojar contenido básico y archivos en un blob de bloques para que un navegador pueda ver y descargar estos datos.
Public Access:
Si accede a su almacenamiento desde otro servicio Azure, el tráfico permanece dentro de Azure.
- Public access can also be granted to enable anonymous access including via HTTP.
- An example of this could be to host basic content and files in a block blob so a browser can view and download this data.
Cuando se trata del rendimiento del almacenamiento tenemos dos tipos diferentes:
If you are accessing your storage from another Azure service, traffic stays within Azure.
- **Estándar** - Número máximo de IOPS
- **Premium** - Número garantizado de IOPS
When it comes to storage performance we have two different types:
IOPS => Operaciones de entrada/salida por segundo.
- **Standard** - Maximum number of IOPS
- **Premium** - Guaranteed number of IOPS
También hay que tener en cuenta la diferencia entre discos no gestionados y gestionados a la hora de elegir el almacenamiento adecuado para la tarea que tenemos.
IOPS => Input/Output operations per sec.
### Almacenamiento de Máquinas Virtuales
There is also a difference between unmanaged and managed disks to consider when choosing the right storage for the task you have.
- Los discos del sistema operativo de la máquina virtual suelen almacenarse en un almacenamiento persistente.
- Algunas cargas de trabajo sin estado no requieren almacenamiento persistente y la reducción de la latencia es un beneficio mayor.
- Hay máquinas virtuales que soportan discos efímeros gestionados por el SO que se crean en el almacenamiento local del nodo.
- Estos también se pueden utilizar con VM Scale Sets.
### Virtual Machine Storage
Los discos gestionados son un almacenamiento en bloque duradero que puede utilizarse con las máquinas virtuales Azure. Pueden tener Ultra Disk Storage, Premium SSD, Standard SSD o Standard HDD. También tienen algunas características.
- Virtual Machine OS disks are typically stored on persistent storage.
- Some stateless workloads do not require persistent storage and reduced latency is a larger benefit.
- There are VMs that support ephemeral OS-managed disks that are created on the node-local storage.
- These can also be used with VM Scale Sets.
- Compatibilidad con instantáneas e imágenes
- Movimiento sencillo entre SKUs
- Mejor disponibilidad cuando se combina con conjuntos de disponibilidad
- Facturación basada en el tamaño del disco, no en el almacenamiento consumido.
Managed Disks are durable block storage that can be used with Azure Virtual Machines. You can have Ultra Disk Storage, Premium SSD, Standard SSD, or Standard HDD. They also carry some characteristics.
## Almacenamiento de archivos
- Snapshot and Image support
- Simple movement between SKUs
- Better availability when combined with availability sets
- Billed based on disk size not on consumed storage.
- **Cool Tier** - Está disponible para bloquear y anexar blobs.
- Menor coste de almacenamiento
- Mayor coste de transacción.
- **Archive Tier** - Está disponible para bloques BLOB.
- Se configura para cada BLOB.
- Coste más bajo, latencia de recuperación de datos más larga.
- Misma durabilidad de datos que el almacenamiento Azure normal.
- Se pueden habilitar niveles de datos personalizados según sea necesario.
## Archive Storage
### Compartir Archivos
- **Cool Tier** - A cool tier of storage is available to block and append blobs.
- Lower Storage cost
- Higher transaction cost.
- **Archive Tier** - Archive storage is available for block BLOBs.
- This is configured on a per-BLOB basis.
- Cheaper cost, Longer Data retrieval latency.
- Same Data Durability as regular Azure Storage.
- Custom Data tiering can be enabled as required.
### File Sharing
From the above creation of our storage account, we can now create file shares.
A partir de la creación anterior de nuestra cuenta de almacenamiento podemos crear archivos compartidos.
![](Images/Day32_Cloud6.png)
This will provide SMB2.1 and 3.0 file shares in Azure.
Esto proporcionará recursos compartidos de archivos SMB2.1 y 3.0 en Azure.
Useable within the Azure and externally via SMB3 and port 445 open to the internet.
Utilizable dentro de Azure y externamente a través de SMB3 y el puerto 445 abierto a Internet.
Provides shared file storage in Azure.
Proporciona almacenamiento compartido de archivos en Azure.
Can be mapped using standard SMB clients in addition to REST API.
Se puede asignar utilizando clientes SMB estándar además de la API REST.
You might also notice [Azure NetApp Files](https://vzilla.co.uk/vzilla-blog/azure-netapp-files-how) (SMB and NFS)
Consultar [Azure NetApp Files](https://vzilla.co.uk/vzilla-blog/azure-netapp-files-how) (SMB y NFS).
### Caching & Media Services
### Almacenamiento en caché y servicios multimedia
The Azure Content Delivery Network provides a cache of static web content with locations throughout the world.
Azure Content Delivery Network proporciona una caché de contenido web estático con ubicaciones en todo el mundo.
Azure Media Services, provides media transcoding technologies in addition to playback services.
Azure Media Services, proporciona tecnologías de transcodificación de medios además de servicios de reproducción.
## Microsoft Azure Database Models
## Modelos de bases de datos de Microsoft Azure
Back on [Day 28](day28.md), we covered various service options. One of these was PaaS (Platform as a Service) where you abstract a large amount of the infrastructure and operating system away and you are left with the control of the application or in this case the database models.
En el [Día 28](day28.md) vimos varias opciones de servicio. Una de ellas era PaaS (Platform as a Service), en la que se abstrae gran parte de la infraestructura y el sistema operativo y se deja el control de la aplicación o, en este caso, de los modelos de bases de datos.
### Relational Databases
### Bases de datos relacionales
Azure SQL Database provides a relational database as a service based on Microsoft SQL Server.
Azure SQL Database proporciona una base de datos relacional como servicio basada en Microsoft SQL Server.
This is SQL running the latest SQL branch with database compatibility level available where a specific functionality version is required.
Se trata de SQL que ejecuta la última rama de SQL con un nivel de compatibilidad de base de datos disponible cuando se requiere una versión de funcionalidad específica.
There are a few options on how this can be configured, we can provide a single database that provides one database in the instance, while an elastic pool enables multiple databases that share a pool of capacity and collectively scale.
Hay algunas opciones sobre cómo esto se puede configurar, podemos proporcionar una única base de datos que proporciona una base de datos en la instancia, mientras que un pool elástico permite múltiples bases de datos que comparten un pool de capacidad y escalan colectivamente.
These database instances can be accessed like regular SQL instances.
Se puede acceder a estas instancias de base de datos como a instancias SQL normales.
Additional managed offerings for MySQL, PostgreSQL and MariaDB.
Ofertas gestionadas adicionales para MySQL, PostgreSQL y MariaDB.
![](Images/Day32_Cloud7.png)
### NoSQL Solutions
Azure Cosmos DB is a scheme agnostic NoSQL implementation.
Azure Cosmos DB es una implementación NoSQL de esquema agnóstico.
99.99% SLA
Globally distributed database with single-digit latencies at the 99th percentile anywhere in the world with automatic homing.
Base de datos distribuida globalmente con latencias de un solo dígito en el porcentaje 99 en cualquier parte del mundo con homing automático.
Partition key leveraged for the partitioning/sharding/distribution of data.
Partition key aprovechada para la partición/sharding/distribución de datos.
Supports various data models (documents, key-value, graph, column-friendly)
Admite varios modelos de datos (documentos, clave-valor, gráfico, amigable con las columnas).
Supports various APIs (DocumentDB SQL, MongoDB, Azure Table Storage and Gremlin)
Soporta varias APIs (DocumentDB SQL, MongoDB, Azure Table Storage y Gremlin)
![](Images/Day32_Cloud9.png)
Various consistency models are available based around [CAP theorem](https://en.wikipedia.org/wiki/CAP_theorem).
Existen varios modelos de consistencia basados en el [teorema CAP](https://es.wikipedia.org/wiki/Teorema_CAP).
![](Images/Day32_Cloud8.png)
### Caching
### Caché
Without getting into the weeds about caching systems such as Redis I wanted to include that Microsoft Azure has a service called Azure Cache for Redis.
Sin entrar en la maleza sobre los sistemas de almacenamiento en caché como Redis quería incluir que Microsoft Azure tiene un servicio llamado Azure Cache para Redis.
Azure Cache for Redis provides an in-memory data store based on the Redis software.
Azure Cache for Redis proporciona un almacén de datos en memoria basado en el software Redis.
- It is an implementation of the open-source Redis Cache.
- A hosted, secure Redis cache instance.
- Different tiers are available
- Application must be updated to leverage the cache.
- Aimed for an application that has high read requirements compared to writes.
- Key-Value store based.
- Se trata de una implementación de la caché Redis de código abierto.
- Una instancia de caché Redis alojada y segura.
- Diferentes niveles disponibles
- La aplicación debe actualizarse para aprovechar la caché.
- Dirigido a aplicaciones que requieren más lecturas que escrituras.
- Basado en almacén clave-valor.
![](Images/Day32_Cloud10.png)
I appreciate the last few days have been a lot of note-taking and theory on Microsoft Azure but I wanted to cover the building blocks before we get into the hands-on aspects of how these components come together and work.
Los últimos días han sido un montón de teorías y tomar notas sobre Microsoft Azure, pero ahora ya tenemos cubierto los bloques de construcción antes de entrar en los aspectos prácticos de cómo estos componentes se unen y trabajan.
We have one more bit of theory remaining around networking before we can get some scenario-based deployments of services up and running. We also want to take a look at some of the different ways we can interact with Microsoft Azure vs just using the portal that we have been using so far.
Solo queda un poco más de teoría sobre redes para que podamos ponernos en marcha con despliegues de servicios basados en escenarios reales. También echaremos un vistazo a algunas de las diferentes formas en que podemos interactuar con Microsoft Azure.
## Resources
## Recursos
- [Hybrid Cloud and MultiCloud](https://www.youtube.com/watch?v=qkj5W98Xdvw)
- [Microsoft Azure Fundamentals](https://www.youtube.com/watch?v=NKEFWyqJ5XA&list=WL&index=130&t=12s)
- [Google Cloud Digital Leader Certification Course](https://www.youtube.com/watch?v=UGRDM86MBIQ&list=WL&index=131&t=10s)
- [AWS Basics for Beginners - Full Course](https://www.youtube.com/watch?v=ulprqHHWlng&t=5352s)
See you on [Day 33](day33.md)
Nos vemos en el [Día 33](day33.md).

View File

@ -1,180 +1,174 @@
## Microsoft Azure Networking Models + Azure Management
## Modelos de red de Microsoft Azure + Gestión de Azure
As if today marks the anniversary of Microsoft Azure and its 12th Birthday! (1st February 2022) Anyway, we are going to cover the networking models within Microsoft Azure and some of the management options for Azure. So far we have only used the Azure portal but we have mentioned other areas that can be used to drive and create our resources within the platform.
Vamos a cubrir los modelos de red dentro de Microsoft Azure y algunas de las opciones de gestión de Azure. Hasta ahora solo hemos utilizado el portal de Azure pero hemos mencionado otras áreas que pueden ser utilizadas para manejar y crear nuestros recursos dentro de la plataforma.
## Azure Network Models
## Modelos de Red Azure
### Virtual Networks
### Redes Virtuales
- A virtual network is a construct created in Azure.
- A virtual network has one or more IP ranges assigned to it.
- Virtual networks live within a subscription within a region.
- Virtual subnets are created in the virtual network to break up the network range.
- Virtual machines are placed in virtual subnets.
- All virtual machines within a virtual network can communicate.
- 65,536 Private IPs per Virtual Network.
- Only pay for egress traffic from a region. (Data leaving the region)
- IPv4 & IPv6 Supported.
- IPv6 for public-facing and within virtual networks.
- Una red virtual es una construcción creada en Azure.
- Una red virtual tiene uno o más rangos de IP asignados.
- Las redes virtuales viven dentro de una suscripción dentro de una región.
- Se crean subredes virtuales en la red virtual para dividir el rango de red.
- Las máquinas virtuales se colocan en subredes virtuales.
- Todas las máquinas virtuales dentro de una red virtual pueden comunicarse.
- 65.536 IPs privadas por red virtual.
- Sólo se paga por el tráfico de salida de una región. (Datos que salen de la región)
- Soporta IPv4 e IPv6.
- IPv6 para redes virtuales de cara al público y dentro de ellas.
We can liken Azure Virtual Networks to AWS VPCs. However, there are some differences to note:
Podemos comparar las redes virtuales de Azure con las VPC de AWS. Sin embargo, hay algunas diferencias a tener en cuenta:
- In AWS a default VNet is created that is not the case in Microsoft Azure, you have to create your first virtual network to your requirements.
- All Virtual Machines by default in Azure have NAT access to the internet. No NAT Gateways as per AWS.
- In Microsoft Azure, there is no concept of Private or Public subnets.
- Public IPs are a resource that can be assigned to vNICs or Load Balancers.
- The Virtual Network and Subnets have their own ACLs enabling subnet level delegation.
- Subnets across Availability Zones whereas in AWS you have subnets per Availability Zones.
- En AWS se crea una VNet por defecto que no es el caso en Microsoft Azure, tienes que crear tu primera red virtual a tu medida.
- Todas las máquinas virtuales por defecto en Azure tienen acceso NAT a Internet. No hay NAT Gateways como en AWS.
- En Microsoft Azure no existe el concepto de subredes Privadas o Públicas.
- Las IPs Públicas son un recurso que puede ser asignado a vNICs o Balanceadores de Carga.
- La red virtual y las subredes tienen sus propias ACL que permiten la delegación a nivel de subred.
- Subredes a través de Zonas de Disponibilidad mientras que en AWS tienes subredes por Zonas de Disponibilidad.
We also have Virtual Network Peering. This enables virtual networks across tenants and regions to be connected using the Azure backbone. Not transitive but can be enabled via Azure Firewall in the hub virtual network. Using a gateway transit allows peered virtual networks to the connectivity of the connected network and an example of this could ExpressRoute to On-Premises.
También tenemos Virtual Network Peering. Esto permite la conexión de redes virtuales entre inquilinos y regiones utilizando la red troncal de Azure. No es transitivo, pero puede activarse a través de Azure Firewall en la red virtual central. El uso de una pasarela de tránsito permite a las redes virtuales peered la conectividad de la red conectada y un ejemplo de esto podría ser [ExpressRoute](https://learn.microsoft.com/es-es/azure/expressroute/expressroute-introduction) a On-Premises.
### Access Control
### Control de acceso
- Azure utilises Network Security Groups, these are stateful.
- Enable rules to be created and then assigned to a network security group
- Network security groups applied to subnets or VMs.
- When applied to a subnet it is still enforced at the Virtual Machine NIC that it is not an "Edge" device.
- Azure utiliza Grupos de Seguridad de Red, estos son de estado.
- Permiten crear reglas y luego asignarlas a un grupo de seguridad de red
- Los grupos de seguridad de red se aplican a subredes o máquinas virtuales.
- Cuando se aplica a una subred todavía se aplica en el NIC de la máquina virtual que no es un dispositivo "Edge".
![](Images/Day33_Cloud1.png)
- Rules are combined in a Network Security Group.
- Based on the priority, flexible configurations are possible.
- Lower priority number means high priority.
- Most logic is built by IP Addresses but some tags and labels can also be used.
- Las reglas se combinan en un Grupo de Seguridad de Red.
- En función de la prioridad, es posible realizar configuraciones flexibles.
- Un número de prioridad bajo significa una prioridad alta.
- La mayor parte de la lógica se construye por Direcciones IP pero también se pueden utilizar algunas etiquetas.
| Description | Priority | Source Address | Source Port | Destination Address | Destination Port | Action |
| ---------------- | -------- | ------------------ | ----------- | ------------------- | ---------------- | ------ |
| Inbound 443 | 1005 | \* | \* | \* | 443 | Allow |
| ILB | 1010 | Azure LoadBalancer | \* | \* | 10000 | Allow |
| Deny All Inbound | 4000 | \* | \* | \* | \* | DENY |
| Descripción | Prioridad | Dirección origen | Puerto de origen | Dirección de destino | Puerto de destino | Acción |
| -------------------------- | --------- | ------------------ | ---------------- | -------------------- | ----------------- | -------- |
| Entrada 443 | 1005 | \* | \* | \* | 443 | Permitir |
| ILB | 1010 | Azure LoadBalancer | \* | \* | 10000 | Permitir |
| Denegar todas las entradas | 4000 | \* | \* | \* | \* | Denegar |
We also have Application Security Groups (ASGs)
También tenemos Grupos de Seguridad de Aplicaciones (ASG - Application Security Groups)
- Where NSGs are focused on the IP address ranges which may be difficult to maintain for growing environments.
- ASGs enable real names (Monikers) for different application roles to be defined (Webservers, DB servers, WebApp1 etc.)
- The Virtual Machine NIC is made a member of one or more ASGs.
- Los NSGs se centran en los rangos de direcciones IPs, que pueden ser difíciles de mantener para entornos en crecimiento.
- Los ASGs permiten definir nombres reales (Monikers) para diferentes roles de aplicación (Webservers, DB servers, WebApp1 etc.)
- La NIC de la máquina virtual se convierte en miembro de uno o más ASG.
The ASGs can then be used in rules that are part of Network Security Groups to control the flow of communication and can still use NSG features like service tags.
Los ASG se pueden utilizar en reglas que forman parte de Grupos de Seguridad de Red para controlar el flujo de comunicación y pueden seguir utilizando funciones de NSG como las etiquetas de servicio.
| Action | Name | Source | Destination | Port |
| ------ | ------------------ | ---------- | ----------- | ------------ |
| Allow | AllowInternettoWeb | Internet | WebServers | 443(HTTPS) |
| Allow | AllowWebToApp | WebServers | AppServers | 443(HTTPS) |
| Allow | AllowAppToDB | AppServers | DbServers | 1443 (MSSQL) |
| Deny | DenyAllinbound | Any | Any | Any |
| Acción | Nombre | Origen | Destino | Puerto |
| -------- | ------------------ | ---------- | ---------- | ------------ |
| Permitir | AllowInternettoWeb | Internet | WebServers | 443(HTTPS) |
| Permitir | AllowWebToApp | WebServers | AppServers | 443(HTTPS) |
| Permitir | AllowAppToDB | AppServers | DbServers | 1443 (MSSQL) |
| Denegar | DenyAllinbound | Any | Any | Any |
### Load Balancing
### Balanceador de carga
Microsoft Azure has two separate load balancing solutions. (the first party, there are third parties available in the Azure marketplace.) Both can operate with externally facing or internally facing endpoints.
Microsoft Azure tiene dos soluciones separadas de equilibrio de carga. Ambas pueden funcionar con puntos finales orientados externamente o internamente. La primera solución son las opciones de terceros disponibles en el marketplace de Azure.
- Load Balancer (Layer 4) supporting hash-based distribution and port-forwarding.
- App Gateway (Layer 7) supports features such as SSL offload, cookie-based session affinity and URL-based content routing.
- Balanceador de carga (capa 4) que admite la distribución basada en hash y el reenvío de puertos.
- App Gateway (capa 7) admite funciones como SSL offload, afinidad de sesión basada en cookies y enrutamiento de contenido basado en URL.
Also with the App Gateway, you can optionally use the Web Application firewall component.
También con App Gateway, puede utilizar opcionalmente el componente Web Application firewall.
## Azure Management Tools
## Herramientas de gestión de Azure
We have spent most of our theory time walking through the Azure Portal, I would suggest that when it comes to following a DevOps culture and process a lot of these tasks, especially around provisioning will be done via an API or a command-line tool. I wanted to touch on some of those other management tools that we have available to us as we need to know this for when we are automating the provisioning of our Azure environments.
Hemos pasado la mayor parte teórica por el Portal de Azure, pero cuando se trata de seguir una cultura DevOps el proceso de muchas de estas tareas (especialmente en torno a aprovisionamiento) se hará a través de una API o una herramienta de línea de comandos. Habría que revisar algunas de estas otras herramientas de gestión que tenemos a nuestra disposición, ya que necesitamos conocerla para cuando estemos automatizando el aprovisionamiento de nuestros entornos Azure.
### Azure Portal
### Portal Azure
The Microsoft Azure Portal is a web-based console, that provides an alternative to command-line tools. You can manage your subscriptions within the Azure Portal. Build, Manage, and Monitor everything from a simple web app to complex cloud deployments. Another thing you will find within the portal are these breadcrumbs, JSON as mentioned before is the underpinning of all Azure Resources, It might be that you start in the Portal to understand the features, services and functionality but then later understand the JSON underneath to incorporate into your automated workflows.
El Microsoft Azure Portal es una consola basada en web, que proporciona una alternativa a las herramientas de línea de comandos. Puedes gestionar tus suscripciones dentro del Portal Azure. Construya, Gestione y Monitorice todo, desde una simple aplicación web hasta complejos despliegues en la nube. Otra cosa que encontrarás en el portal son las migas de pan. Como ya se mencionó, JSON es la base de todos los recursos de Azure. Puede ser que comiences en el Portal para entender las características, servicios y funcionalidad, pero tarde o temprano tendrás que entender el JSON para incorporar flujos de trabajo automatizados.
![](Images/Day33_Cloud2.png)
There is also the Azure Preview portal, this can be used to view and test new and upcoming services and enhancements.
También existe el portal Azure Preview, que puede utilizarse para ver y probar servicios y mejoras.
![](Images/Day33_Cloud3.png)
### PowerShell
Before we get into Azure PowerShell it is worth introducing PowerShell first. PowerShell is a task automation and configuration management framework, a command-line shell and a scripting language. We might and dare I say this liken this to what we have covered in the Linux section around shell scripting. PowerShell was very much first found on Windows OS but it is now cross-platform.
Antes de adentrarnos en Azure PowerShell, conviene presentar PowerShell. PowerShell es un marco de automatización de tareas y gestión de la configuración, un shell de línea de comandos y un lenguaje de scripting. Podríamos decir que esto se asemeja a lo que hemos visto en la sección de Linux sobre shell scripting. PowerShell se utilizó por primera vez en el sistema operativo Windows, pero ahora es multiplataforma.
Azure PowerShell is a set of cmdlets for managing Azure resources directly from the PowerShell command line.
Azure PowerShell es un conjunto de cmdlets para gestionar los recursos de Azure directamente desde la línea de comandos de PowerShell.
We can see below that you can connect to your subscription using the PowerShell command `Connect-AzAccount`
Podemos ver a continuación que te puedes conectar a una suscripción mediante el comando PowerShell `Connect-AzAccount`.
![](Images/Day33_Cloud4.png)
Then if we wanted to find some specific commands associated with Azure VMs we can run the following command. You could spend hours learning and understanding more about this PowerShell programming language.
Luego, si quisiéramos encontrar algunos comandos específicos asociados a las VMs de Azure podemos ejecutar el siguiente comando. Podrías pasarte horas aprendiendo y entendiendo más sobre este lenguaje de programación.
![](Images/Day33_Cloud5.png)
There are some great quickstarts from Microsoft on getting started and provisioning services from PowerShell [here](https://docs.microsoft.com/en-us/powershell/azure/get-started-azureps?view=azps-7.1.0)
Hay algunos buenos quickstarts de Microsoft para empezar a aprovisionar servicios desde PowerShell [aquí](https://docs.microsoft.com/en-us/powershell/azure/get-started-azureps?view=azps-7.1.0)
### Visual Studio Code
Like many, and as you have all seen my go-to IDE is Visual Studio Code.
Como habréis visto la IDE de cabecera en el tutorial es Visual Studio Code. Visual Studio Code es un editor de código fuente gratuito creado por Microsoft para Windows, Linux y macOS.
Visual Studio Code is a free source-code editor made by Microsoft for Windows, Linux and macOS.
You will see below that there are lots of integrations and tools built into Visual Studio Code that you can use to interact with Microsoft Azure and the services within.
Verás a continuación que hay un montón de integraciones y herramientas integradas en Visual Studio Code que puedes utilizar para interactuar con Microsoft Azure y los servicios que contiene.
![](Images/Day33_Cloud6.png)
### Cloud Shell
Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing Azure resources. It provides the flexibility of choosing the shell experience that best suits the way you work.
Azure Cloud Shell es un shell interactivo, autenticado y accesible desde el navegador para gestionar los recursos de Azure. Proporciona la flexibilidad de elegir la experiencia de shell que mejor se adapte a su forma de trabajar.
![](Images/Day33_Cloud7.png)
You can see from the below when we first launch Cloud Shell within the portal we can choose between Bash and PowerShell.
Puedes ver en la siguiente imagen que cuando lanzamos Cloud Shell por primera vez dentro del portal podemos elegir entre Bash y PowerShell.
![](Images/Day33_Cloud8.png)
To use the cloud shell you will have to provide a bit of storage in your subscription.
Para utilizar Cloud Shell tendrás que proporcionar un poco de almacenamiento en tu suscripción.
When you select to use the cloud shell it is spinning up a machine, these machines are temporary but your files are persisted in two ways; through a disk image and a mounted file share.
Cuando seleccionas el intérprete de comandos en la nube, se pone en marcha una máquina. Estas máquinas son temporales, pero tus archivos se conservan de dos maneras: a través de una imagen de disco y en un archivo compartido montado.
![](Images/Day33_Cloud9.png)
- Cloud Shell runs on a temporary host provided on a per-session, per-user basis
- Cloud Shell times out after 20 minutes without interactive activity
- Cloud Shell requires an Azure file share to be mounted
- Cloud Shell uses the same Azure file share for both Bash and PowerShell
- Cloud Shell is assigned one machine per user account
- Cloud Shell persists $HOME using a 5-GB image held in your file share
- Permissions are set as a regular Linux user in Bash
- Cloud Shell se ejecuta en un host temporal proporcionado por sesión y por usuario.
- Cloud Shell se desconecta después de 20 minutos sin actividad interactiva.
- Cloud Shell requiere que se monte un archivo compartido de Azure.
- Cloud Shell utiliza el mismo recurso compartido de archivos de Azure para Bash y PowerShell.
- Cloud Shell tiene asignada una máquina por cuenta de usuario.
- Cloud Shell persiste $HOME utilizando una imagen de 5 GB guardada en su recurso compartido de archivos.
- Los permisos se establecen como un usuario normal de Linux en Bash.
The above was copied from [Cloud Shell Overview](https://docs.microsoft.com/en-us/azure/cloud-shell/overview)
Lo anterior fue copiado de [Cloud Shell Overview](https://docs.microsoft.com/en-us/azure/cloud-shell/overview).
### Azure CLI
Finally, I want to cover the Azure CLI, The Azure CLI can be installed on Windows, Linux and macOS. Once installed you can type `az` followed by other commands to create, update, delete and view Azure resources.
Por último vamos a echar un ojo a Azure CLI. Azure CLI se puede instalar en Windows, Linux y macOS. Una vez instalado se puede escribir `az` seguido de otros comandos para crear, actualizar, eliminar y ver los recursos de Azure.
When I initially came into my Azure learning I was a little confused by there being Azure PowerShell and the Azure CLI.
Al empezar con Azure es confusa la existencia de Azure PowerShell y Azure CLI. Estaría bien algún comentario de la comunidad sobre esto. Pero una visión objetica es que Azure PowerShell es un módulo añadido a Windows PowerShell o PowerShell Core (También disponible en otros sistemas operativos, pero no todos), mientras que Azure CLI es un programa de línea de comandos multiplataforma que se conecta a Azure y ejecuta los comandos.
I would love some feedback from the community on this as well. But the way I see it is that Azure PowerShell is a module added to Windows PowerShell or PowerShell Core (Also available on other OS but not all) Whereas Azure CLI is a cross-platform command-line program that connects to Azure and executes those commands.
Ambas opciones tienen una sintaxis diferente, aunque pueden hacer tareas muy similares.
Both of these options have a different syntax, although they can from what I can see and what I have done do very similar tasks.
For example, creating a virtual machine from PowerShell would use the `New-AzVM` cmdlet whereas Azure CLI would use `az VM create`.
You saw previously that I have the Azure PowerShell module installed on my system but then I also have the Azure CLI installed that can be called through PowerShell on my Windows machine.
Por ejemplo, crear una máquina virtual desde PowerShell usaría el cmdlet `New-AzVM` mientras que Azure CLI usaría `az VM create`.
![](Images/Day33_Cloud10.png)
The takeaway here as we already mentioned is about choosing the right tool. Azure runs on automation. Every action you take inside the portal translates somewhere to code being executed to read, create, modify, or delete resources.
Como ya hemos mencionado, lo importante aquí es elegir la herramienta adecuada para cada tarea. Azure se basa en la automatización. Cada acción que realizas dentro del portal se traduce en algún lugar en código que se ejecuta para leer, crear, modificar o eliminar recursos.
Azure CLI
- Cross-platform command-line interface, installable on Windows, macOS, Linux
- Runs in Windows PowerShell, Cmd, Bash and other Unix shells.
- Interfaz de línea de comandos multiplataforma, instalable en Windows, macOS y Linux.
- Se ejecuta en Windows PowerShell, Cmd, Bash y otros shells Unix.
Azure PowerShell
- Cross-platform PowerShell module, runs on Windows, macOS, Linux
- Requires Windows PowerShell or PowerShell
- Módulo PowerShell multiplataforma, ejecutable en Windows, macOS, Linux.
- Requiere Windows PowerShell o PowerShell.
If there is a reason you cannot use PowerShell in your environment but you can use .mdor bash then the Azure CLI is going to be your choice.
Si hay una razón por la que no puede utilizar PowerShell en su entorno, pero puede utilizar .mdor bash entonces el Azure CLI va a ser su elección.
Next up we take all the theories we have been through and create some scenarios and get hands-on in Azure.
A continuación vamos a tomar todas las teorías que hemos estado a través de y crear algunos escenarios y ponerse manos a la obra en Azure.
## Resources
## Recursos
- [Hybrid Cloud and MultiCloud](https://www.youtube.com/watch?v=qkj5W98Xdvw)
- [Microsoft Azure Fundamentals](https://www.youtube.com/watch?v=NKEFWyqJ5XA&list=WL&index=130&t=12s)
- [Google Cloud Digital Leader Certification Course](https://www.youtube.com/watch?v=UGRDM86MBIQ&list=WL&index=131&t=10s)
- [AWS Basics for Beginners - Full Course](https://www.youtube.com/watch?v=ulprqHHWlng&t=5352s)
See you on [Day 34](day34.md)
Nos vemos en el [Día 34](day34.md)

View File

@ -1,128 +1,126 @@
## Microsoft Azure Hands-On Scenarios
## Microsoft Azure Escenarios Prácticos
The last 6 days have been focused on Microsoft Azure and the public cloud in general, a lot of this foundation had to contain a lot of theory to understand the building blocks of Azure but also this will nicely translate to the other major cloud providers as well.
En los últimos 6 días nos hemos centrado en Microsoft Azure y la nube pública para conseguir una mínima base, teníamos que pasar por la teoría para entender los bloques de construcción de Azure. Lo bueno es que esto se traduce muy bien a los otros proveedores de la nube más importantes, tan solo hay que saber como le llaman a cada componente o servicio homólogo.
I mentioned at the very beginning about getting a foundational knowledge of the public cloud and choosing one provider to at least begin with, if you are dancing between different clouds then I believe you can get lost quite easily whereas choosing one you get to understand the fundamentals and when you have those it is quite easy to jump into the other clouds and accelerate your learning.
Al principio se mencionó esta necesidad de obtener un conocimiento básico de la nube pública y importación de la elección de un proveedor, al menos para empezar, porque si estás danzando entre diferentes nubes puede crear confusiones y perderse con facilidad. Mientras que con la elección de una en concreto se llega a entender mejor los fundamentos, así cuando surja la necesidad de saltar a otras nubes será mucho más ágil el aprendizaje.
In this final session, I am going to be picking and choosing my hands-on scenarios from this page here which is a reference created by Microsoft and is used for preparations for the [AZ-104 Microsoft Azure Administrator](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/)
En esta última sesión veremos escenarios prácticos de la siguiente página que se enlaza, una referencia creada por Microsoft para la preparación del examen [AZ-104 Microsoft Azure Administrator](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/).
There are some here such as Containers and Kubernetes that we have not covered in any detail as of yet so I don't want to jump in there just yet.
Algunos como contenedores y Kubernetes aun no están cubiertos en detalle en este viaje, así que no adelantemos acontecimientos todavía.
In previous posts, we have created most of Modules 1,2 and 3.
En los días anteriores sí que se ha visto gran parte de los Módulos 1,2 y 3 👍
### Virtual Networking
### Redes Virtuales
Following [Module 04](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_04-Implement_Virtual_Networking.html):
Siguiendo y revisando el [Módulo 04](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_04-Implement_Virtual_Networking.html) se han cambiado algunos nombres para #90DaysOfDevOps.
I went through the above and changed a few namings for #90DaysOfDevOps. I also instead of using the Cloud Shell went ahead and logged in with my new user created on previous days with the Azure CLI on my Windows machine.
También, en lugar de utilizar el Cloud Shell iniciamos sesión con el nuevo usuario creado en días anteriores con el CLI de Azure.
You can do this using the `az login` which will open a browser and let you authenticate to your account.
Se puede hacer esto usando el `az login` que abrirá un navegador y permite autenticar en la cuenta.
I have then created a PowerShell script and some references from the module to use to build out some of the tasks below. You can find the associated files in this folder.
(Cloud\01VirtualNetworking)
A continuación, veremos un script PowerShell y algunas referencias del módulo a utilizar para construir algunas de las tareas. Puedes encontrar los archivos asociados en esta carpeta [Cloud\01VirtualNetworking](Cloud/01VirtualNetworking/)
Please make sure you change the file location in the script to suit your environment.
Asegúrese de cambiar la ubicación del archivo en el script para adaptarlo a tu entorno.
At this first stage, we have no virtual network or virtual machines created in our environment, I only have a cloud shell storage location configured in my resource group.
En esta primera etapa, no tenemos ninguna red virtual o máquinas virtuales creadas en nuestro entorno, sólo tengo una ubicación de almacenamiento shell en la nube configurada en mi grupo de recursos.
I first of all run my [PowerShell script](Cloud/01VirtualNetworking/Module4_90DaysOfDevOps.ps1)
En primer lugar ejecuto mi [script PowerShell](Cloud/01VirtualNetworking/Module4_90DaysOfDevOps.ps1).
![](Images/Day34_Cloud1.png)
- Task 1: Create and configure a virtual network
- Tarea 1: Crear y configurar una red virtual.
![](Images/Day34_Cloud2.png)
- Task 2: Deploy virtual machines into the virtual network
- Tarea 2: Desplegar máquina virtual en la red virtual.
![](Images/Day34_Cloud3.png)
- Task 3: Configure private and public IP addresses of Azure VMs
- Tarea 3: Configurar las direcciones IP privadas y públicas de las máquinas virtuales Azure.
![](Images/Day34_Cloud4.png)
- Task 4: Configure network security groups
- Tarea 4: Configurar grupos de seguridad en red.
![](Images/Day34_Cloud5.png)
![](Images/Day34_Cloud6.png)
- Task 5: Configure Azure DNS for internal name resolution
- Tarea 5: Configurar Azure DNS para la resolución de nombres internos.
![](Images/Day34_Cloud7.png)
![](Images/Day34_Cloud8.png)
### Network Traffic Management
### Gestión de tráfico de red
Following [Module 06](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_06-Implement_Network_Traffic_Management.html):
Siguiendo el [Módulo 06](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_06-Implement_Network_Traffic_Management.html):
Next walkthrough, from the last one we have gone into our resource group and deleted our resources, if you had not set up the user account like me to only have access to that one resource group you could follow the module changing the name to `90Days*` this will delete all resources and resource group. This will be my process for each of the following labs.
Si no has configurado la cuenta de usuario para que sólo tenga acceso a ese grupo de recursos, puedes seguir el módulo cambiando el nombre a '90 días*'. Esto eliminará todos los recursos y el grupo de recursos. Este será el proceso para cada uno de los siguientes laboratorios.
For this lab, I have also created a PowerShell script and some references from the module to use to build out some of the tasks below. You can find the associated files in this folder.
(Cloud\02TrafficManagement)
Para este laboratorio, también se ha creado una secuencia de comandos PowerShell y algunas referencias del módulo a utilizar para construir algunas de las tareas. Puede encontrar los archivos asociados en esta carpeta.
[Nube\02GestiónDeTráfico](Nube\02GestiónDeTráfico)
- Task 1: Provision of the lab environment
- Tarea 1: Provisión del entorno de laboratorio
I first of all run my [PowerShell script](Cloud/02TrafficManagement/Mod06_90DaysOfDevOps.ps1)
En primer lugar ejecuto mi [script PowerShell](Cloud/02TrafficManagement/Mod06_90DaysOfDevOps.ps1)
![](Images/Day34_Cloud9.png)
- Task 2: Configure the hub and spoke network topology
- Tarea 2: Configurar la [topología de red de concentrador y radio (Hub-and-spoke)](https://learn.microsoft.com/es-es/azure/cloud-adoption-framework/ready/azure-best-practices/hub-spoke-network-topology)
![](Images/Day34_Cloud10.png)
- Task 3: Test transitivity of virtual network peering
- Tarea 3: Probar la transitividad del peering de la red virtual
For this my 90DaysOfDevOps group did not have access to the Network Watcher because of permissions, I expect this is because Network Watchers are one of those resources that are not tied to a resource group which is where our RBAC was covered for this user. I added the East US Network Watcher contributor role to the 90DaysOfDevOps group.
El grupo 90DaysOfDevOps no tenía acceso al Network Watcher debido a los permisos, espero que esto se deba a que los Network Watchers son uno de esos recursos que no están ligados a un grupo de recursos, que es donde nuestro RBAC estaba cubierto para este usuario. Se ha añadido el rol de colaborador del Vigilante de Red del Este de EEUU al grupo 90DaysOfDevOps.
![](Images/Day34_Cloud11.png)
![](Images/Day34_Cloud12.png)
![](Images/Day34_Cloud13.png)
^ This is expected since the two spoke virtual networks do not peer with each other (virtual network peering is not transitive).
^ Esto es lo esperado ya que las dos redes virtuales spoke no son peer entre sí (el peering de redes virtuales no es transitivo).
- Task 4: Configure routing in the hub and spoke topology
- Tarea 4: Configurar el enrutamiento en la topología de red de concentrador y radio
I had another issue here with my account not being able to run the script as my user within the group 90DaysOfDevOps which I am unsure of so I did jump back into my main admin account. The 90DaysOfDevOps group is an owner of everything in the 90DaysOfDevOps Resource Group so would love to understand why I cannot run a command inside the VM?
Tuve otro problema aquí con mi cuenta no ser capaz de ejecutar el script como mi usuario dentro del grupo 90DaysOfDevOps que no estoy seguro de lo que hice saltar de nuevo en mi cuenta de administrador principal. El grupo 90DaysOfDevOps es el propietario de todo lo que hay en el grupo de recursos 90DaysOfDevOps, así que me gustaría saber por qué no puedo ejecutar un comando dentro de la máquina virtual.
![](Images/Day34_Cloud14.png)
![](Images/Day34_Cloud15.png)
I then was able to go back into my michael.cade@90DaysOfDevOps.com account and continue this section. Here we are running the same test again but now with the result being reachable.
Entonces pude volver a entrar en la cuenta michael.cade@90DaysOfDevOps.com y continuar con esta sección. Aquí estamos ejecutando la misma prueba de nuevo pero ahora con el resultado alcanzable.
![](Images/Day34_Cloud16.png)
- Task 5: Implement Azure Load Balancer
- Tarea 5: Implementar Azure Load Balancer
![](Images/Day34_Cloud17.png)
![](Images/Day34_Cloud18.png)
- Task 6: Implement Azure Application Gateway
- Tarea 6: Implementar Azure Application Gateway
![](Images/Day34_Cloud19.png)
![](Images/Day34_Cloud20.png)
### Azure Storage
### Almcacenamiento Azure
Following [Module 07](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_07-Manage_Azure_Storage.html):
Siguiendo el [Módulo 07](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_07-Manage_Azure_Storage.html):
For this lab, I have also created a PowerShell script and some references from the module to use to build out some of the tasks below. You can find the associated files in this folder.
(Cloud\03Storage)
Para el siguiente laboratorio, también tenemos un script de PowerShell y algunas referencias del módulo a utilizar para construir algunas de las tareas. Puedes encontrar los archivos asociados en la carpeta [Cloud\03Storage](Cloud\03Storage).
- Task 1: Provision of the lab environment
- Tarea 1: Provisión del entorno de laboratorio.
I first of all run my [PowerShell script](Cloud/03Storage/Mod07_90DaysOfDeveOps.ps1)
En primer lugar se ejecuta el [script PowerShell](Cloud/03Storage/Mod07_90DaysOfDeveOps.ps1)
![](Images/Day34_Cloud21.png)
- Task 2: Create and configure Azure Storage accounts
- Tarea 2: Crear y configurar cuentas Azure Storage.
![](Images/Day34_Cloud22.png)
- Task 3: Manage blob storage
- Tarea 3: Gestionar el almacenamiento blob
![](Images/Day34_Cloud23.png)
- Task 4: Manage authentication and authorization for Azure Storage
- Tarea 4: Gestionar la autenticación y autorización para Azure Storage
![](Images/Day34_Cloud24.png)
![](Images/Day34_Cloud25.png)
@ -133,55 +131,55 @@ I was a little impatient waiting for this to be allowed but it did work eventual
- Task 5: Create and configure an Azure Files shares
On the run command, this would not work with michael.cade@90DaysOfDevOps.com so I used my elevated account.
Se debe tener paciencia esperando a que esto se autorice.
![](Images/Day34_Cloud27.png)
![](Images/Day34_Cloud28.png)
![](Images/Day34_Cloud29.png)
- Task 6: Manage network access for Azure Storage
- Tarea 6: Gestionar acceso a la red para Azure Storage
![](Images/Day34_Cloud30.png)
### Serverless (Implement Web Apps)
### Serverless (Implementar Web Apps)
Following [Module 09a](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_09a-Implement_Web_Apps.html):
Ahora toca el [Módulo 09a](https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/Instructions/Labs/LAB_09a-Implement_Web_Apps.html):
- Task 1: Create an Azure web app
- Tarea 1: Crear un Azure web app
![](Images/Day34_Cloud31.png)
- Task 2: Create a staging deployment slot
- Tarea 2: Crear un slot de despliegue de preparación
![](Images/Day34_Cloud34.png)
- Task 3: Configure web app deployment settings
- Tarea 3: Configurar opciones del despliegue web app
![](Images/Day34_Cloud33.png)
- Task 4: Deploy code to the staging deployment slot
- Tarea 4: Desplegar el código en el slot de despliegue de preparación
![](Images/Day34_Cloud32.png)
- Task 5: Swap the staging slots
- Tarea 5: Intercambiar slots de preparación
![](Images/Day34_Cloud35.png)
- Task 6: Configure and test autoscaling of the Azure web app
- Tarea 6: Configurar y testear el autoescalado de Azure web app
This script I am using can be found in (Cloud/05Serverless)
Este script que estoy usando se puede encontrar en la carpeta [Cloud/05Serverless](Cloud/05Serverless)
![](Images/Day34_Cloud36.png)
This wraps up the section on Microsoft Azure and the public cloud in general. I will say that I had lots of fun attacking and working through these scenarios.
Con esto terminamos la sección sobre Microsoft Azure y la nube pública en general. Espero que te hayas divertido trabajando los distintos escenarios.
## Resources
## Recursos
- [Hybrid Cloud and MultiCloud](https://www.youtube.com/watch?v=qkj5W98Xdvw)
- [Microsoft Azure Fundamentals](https://www.youtube.com/watch?v=NKEFWyqJ5XA&list=WL&index=130&t=12s)
- [Google Cloud Digital Leader Certification Course](https://www.youtube.com/watch?v=UGRDM86MBIQ&list=WL&index=131&t=10s)
- [AWS Basics for Beginners - Full Course](https://www.youtube.com/watch?v=ulprqHHWlng&t=5352s)
Next, we will be diving into version control systems, specifically around git and then also code repository overviews and we will be choosing GitHub as this is my preferred option.
A continuación, vamos a sumergirnos en los sistemas de control de versiones, en concreto en torno a git. Para los repositorios de código veremos GitHub, una de las opciones más utilizadas.
See you on [Day 35](day35.md)
Nos vemos en el [Día 35](day35.md)

View File

@ -1,124 +1,124 @@
## The Big Picture: Git - Version Control
## El panorama: Git - Control de versiones
Before we get into git, we need to understand what version control is and why? In this opener for Git, we will take a look at what version control is, and the basics of git.
Antes de adentrarnos en git, necesitamos entender qué es el control de versiones y por qué. En esta introducción a Git, le echaremos un vistazo al control de versiones y a los fundamentos de git.
### What is Version Control?
### ¿Qué es el control de versiones?
Git is not the only version control system so here we want to cover what options and what methodologies are available around version control.
Git no es el único sistema de control de versiones, así que aquí queremos cubrir qué opciones y qué metodologías hay disponibles en torno al control de versiones.
The most obvious and a big benefit of Version Control is the ability to track a project's history. We can look back over this repository using `git log` and see that we have many commits and many comments and what has happened so far in the project. Don't worry we will get into the commands later. Now think if this was an actual software project full of source code and multiple people are committing to our software at different times, different authors and then reviewers all are logged here so that we know what has happened, when, by whom and who reviewed.
El más obvio y gran beneficio del Control de Versiones es la capacidad de rastrear la historia de un proyecto. Podemos mirar atrás en este repositorio usando `git log` y ver que tenemos muchos commits (Confirmaciones de cambios), muchos comentarios y analizar lo que ha pasado desde el principio del proyecto. No te preocupes, hablaremos de los comandos más tarde. Ahora piensa en un proyecto de software real lleno de código fuente y con varias personas haciendo commits a nuestro software en diferentes momentos, diferentes autores, luego revisores... todo se registra para que sepamos lo que ha sucedido, cuándo, por quién y quién revisó.
![](Images/Day35_Git1.png)
Version Control before it was cool, would have been something like manually creating a copy of your version before you made changes. It might be that you also comment out old useless code with the just-in-case mentality.
El control de versiones antes de que fuera cool, habría sido algo como crear manualmente una copia de tu versión antes de hacer cambios y, manualmente también, hacer anotaciones de los cambios en un documento típicamente llamado changelog. Podría ser también que comentaras código viejo inútil con la mentalidad del "por si acaso" y lo dejarás entre el código fuente haciendo bulto.
![](Images/Day35_Git2.png)
I have started using version control over not just source code but pretty much anything, talks about projects like this (90DaysOfDevOps). Why not accept the features that rollback and log of everything that has gone on.
Una vez te das cuenta de los beneficios del control de versiones no sólo lo utilizas sobre el código fuente, sino sobre prácticamente cualquier cosa, como proyectos como 90DaysOfDevOps. ¿Por qué no aprovechar las características que rollback y el registro de todo lo que ha pasado?
However, a big disclaimer **Version Control is not a Backup!**
Sin embargo, una gran advertencia: ⚠️ **¡Control de versiones no es una copia de seguridad!** ⚠️
Another benefit of Version Control is the ability to manage multiple versions of a project, Let's create an example, we have a free app that is available on all operating systems and then we have a paid-for app also available on all operating systems. The majority of the code is shared between both applications. We could copy and paste our code each commit to each app but that is going to be very messy especially as you scale your development to more than just one person, also mistakes will be made.
Otro beneficio del Control de Versiones es la capacidad de gestionar múltiples versiones de un proyecto, vamos a crear un ejemplo, tenemos una aplicación gratuita que está disponible en todos los sistemas operativos y luego tenemos una aplicación de pago también disponible en todos los sistemas operativos. La mayor parte del código se comparte entre ambas aplicaciones. Podríamos copiar y pegar nuestro código en cada commit para cada aplicación, pero eso va a ser muy desordenado, especialmente a medida que escalas tu desarrollo a más de una persona, también se cometerán errores.
The premium app is where we are going to have additional features, let's call them premium commits, the free edition will just contain the normal commits.
La aplicación premium es donde vamos a tener características adicionales, vamos a llamarlos commits premium, la edición gratuita sólo contendrá los commits normales.
The way this is achieved in Version Control is through branching.
La forma en que esto se logra en el Control de Versiones es a través de la ramificación.
![](Images/Day35_Git3.png)
Branching allows for two code streams for the same app as we stated above. But we will still want new features that land in our source code-free version to be in our premium and to achieve this we have something called merging.
La ramificación (branching) permite dos flujos de código para la misma aplicación, como hemos dicho anteriormente. Pero todavía queremos nuevas características que aterrizan en nuestra versión código libre para estar en nuestra prima y para lograr esto tenemos algo que se llama fusión (merging).
![](Images/Day35_Git4.png)
Now, this same easy but merging can be complicated because you could have a team working on the free edition and you could have another team working on the premium paid-for version and what if both change code that affects aspects of the overall code. Maybe a variable gets updated and breaks something. Then you have a conflict that breaks one of the features. Version Control cannot fix the conflicts that are down to you. But version control allows this to be easily managed.
Hacer esto mismo ahora es facilísimo, pero la fusión puede ser complicada porque podrías tener un equipo trabajando en la edición gratuita y podrías tener otro equipo trabajando en la versión premium de pago y ¿qué pasa si ambos equipos cambian código que afecta a aspectos del código general? Tal vez una variable se actualiza y rompe algo. Aquí se produce un conflicto que rompe una de las características. El control de versiones no puede arreglar los conflictos pero permite gestionarlos fácilmente.
The primary reason if you have not picked up so far for version control, in general, is the ability to collaborate. The ability to share code amongst developers and when I say code as I said before more and more we are seeing much more use cases for other reasons to use source control, maybe its a joint presentation you are working on with a colleague or a 90DaysOfDevOps challenge where you have the community offering their corrections and updates throughout the project.
La razón principal de utilizar el control de versiones, en general, es la capacidad de poder colaborar. La capacidad de compartir código entre los desarrolladores es algo principal, pero cada vez se ven más casos de uso. Por ejemplo, en una presentación conjunta que trabajas con un colega o en un reto 90DaysOfDevOps donde tienes una comunidad que ofrece sus correcciones y actualizaciones en todo el proyecto, como esta traducción.
Without version control how did teams of software developers even handle this? I find it hard enough when I am working on my projects to keep track of things. I expect they would split out the code into each functional module. Maybe a little part of the puzzle then was bringing the pieces together and then problems and issues before anything would get released.
Sin el control de versiones, ¿cómo se las arreglaban los equipos de desarrolladores de software? Cuando trabajo en mis proyectos me resulta bastante difícil hacer un seguimiento de las cosas. Supongo que dividirían el código en módulos funcionales y luego, como un puzzle, iban juntando las piezas y resolviendo los problemas antes de que algo se publicara. [El desarrollo en cascada](https://es.wikipedia.org/wiki/Desarrollo_en_cascada).
With version control, we have a single source of truth. We might all still work on different modules but it enables us to collaborate better.
Con el control de versiones, tenemos una única fuente de verdad. Puede que todos sigamos trabajando en módulos diferentes, pero nos permite colaborar mejor porque vemos en tiempo real el trabajo de los demás.
![](Images/Day35_Git5.png)
Another thing to mention here is that it's not just developers that can benefit from Version Control, it's all members of the team to have visibility but also tools all having awareness or leverage, Project Management tools can be linked here, tracking the work. We might also have a build machine for example Jenkins which we will talk about in another module. A tool that Builds and Packages the system, automating the deployment tests and metrics.
Otra cosa importante a mencionar es que no son sólo los desarrolladores quienes pueden beneficiarse del Control de Versiones. Todos los miembros del equipo deben tener visibilidad, pero también las herramientas que todos deben conocer o aprovechar. Las herramientas de Gestión de Proyectos pueden estar vinculadas aquí, rastreando el trabajo. También podríamos tener una máquina de construcción, por ejemplo Jenkins, de la que hablaremos en otro módulo. Una herramienta que construye y empaqueta el sistema, automatizando las pruebas de despliegue y las métricas. Y mucho más...
### What is Git?
### ¿Qué es Git?
Git is a tool that tracks changes to source code or any file, or we could also say Git is an open-source distributed version control system.
Git es una herramienta que rastrea los cambios en el código fuente o en cualquier archivo, o también podríamos decir que Git es un sistema de control de versiones distribuido de código abierto.
There are many ways in which git can be used on our systems, most commonly or at least for me I have seen it at the command line, but we also have graphical user interfaces and tools like Visual Studio Code that have git-aware operations we can take advantage of.
Hay muchas formas de utilizar git en nuestros sistemas, lo más habitual es usarlo en la línea de comandos, pero también tenemos interfaces gráficas de usuario y herramientas como Visual Studio Code que tienen operaciones git-aware que podemos aprovechar.
Now we are going to run through a high-level overview before we even get Git installed on our local machine.
Ahora vamos a ejecutar a través de una visión general de alto nivel, incluso antes de tener Git instalado en nuestra máquina local.
Let's take the folder we created earlier.
Utilicemos la carpeta que hemos creado antes.
![](Images/Day35_Git2.png)
To use this folder with version control we first need to initiate this directory using the `git init` command. For now, just think that this command puts our directory as a repository in a database somewhere on our computer.
Para usar esta carpeta con el control de versiones primero necesitamos iniciar este directorio usando el comando `git init`. Por ahora, piensa que este comando pone nuestro directorio como repositorio en una base de datos en algún lugar de nuestro ordenador.
![](Images/Day35_Git6.png)
Now we can create some files and folders and our source code can begin or maybe it already has and we have something in here already. We can use the `git add .` command which puts all files and folders in our directory into a snapshot but we have not yet committed anything to that database. We are just saying all files with the `.` are ready to be added.
Ahora podemos crear algunos archivos y carpetas y nuestro código fuente puede comenzar. Podemos usar el comando `git add .` que pone todos los archivos y carpetas de nuestro directorio en una instantánea pero todavía no hemos confirmado nada en esa base de datos. Sólo estamos diciendo que todos los archivos con el `.` están listos para ser añadidos.
![](Images/Day35_Git7.png)
Then we want to go ahead and commit our files, we do this with the `git commit -m "My First Commit"` command. We can give a reason for our commit and this is suggested so we know what has happened for each commit.
A continuación, queremos seguir adelante y confirmar nuestros archivos, lo hacemos con el comando `git commit -m "Mi primer commit"`. Podemos dar una razón para nuestro commit y es recomendable para que sepamos lo que ha sucedido en cada commit. Se hace con la opción de mensaje `-m`.
![](Images/Day35_Git8.png)
We can now see what has happened within the history of the project. Using the `git log` command.
Ahora podemos ver lo que ha pasado en la historia del proyecto. Usando el comando `git log`.
![](Images/Day35_Git9.png)
If we create an additional file called `samplecode.ps1`, the status would become different. We can also check the status of our repository by using `git status` this shows we have nothing to commit and we can add a new file called samplecode.ps1. If we then run the same `git status` you will see that we file to be committed.
Si creamos un fichero adicional llamado `samplecode.ps1` el estado de este será diferente. Podemos comprobar el estado de nuestro repositorio mediante el uso de `git status` esto muestra que no tenemos nada que confirmar y podemos añadir un nuevo archivo llamado `samplecode.ps1`. Ejecutamos el mismo `git status` y veremos que tenemos un fichero para añadir y confirmar (comitear, commit verborizado al español por los murcianos).
![](Images/Day35_Git10.png)
Add our new file using the `git add sample code.ps1` command and then we can run `git status` again and see our file is ready to be committed.
Añadimos nuestro nuevo fichero usando el comando `git add sample code.ps1` y entonces podemos ejecutar `git status` de nuevo y ver que nuestro fichero está listo para ser comiteado.
![](Images/Day35_Git11.png)
Then issue `git commit -m "My Second Commit"` command.
Pues a comitear se ha dicho, ejecutamos el comando `git commit -m "My Second Commit"`.
![](Images/Day35_Git12.png)
Another `git status` now shows everything is clean again.
Otro `git status` nos muestra que todo está limpio, lo tenemos subido al repositorio local.
![](Images/Day35_Git13.png)
We can then use the `git log` command which shows the latest changes and first commit.
Podemos usar el comando `git log` que muestra los últimos cambios y el primer commit.
![](Images/Day35_Git14.png)
If we wanted to see the changes between our commits i.e what files have been added or modified we can use the `git diff b8f8 709a`
Si quisiéramos ver los cambios entre nuestras confirmaciones, es decir, qué archivos se han añadido o modificado, podemos usar `git diff b8f8 709a`.
![](Images/Day35_Git15.png)
Which then displays what has changed in our case we added a new file.
Nos mostrará lo que ha cambiado. En nuestro caso veremos el fichero añadido.
![](Images/Day35_Git16.png)
We will go deeper into this later on but we can jump around our commits i.e we can go time travelling! By using our commit number we can use the `git checkout 709a` command to jump back in time without losing our new file.
Profundizaremos en esto más adelante pero para empezar a degustar las delicias de git: podemos saltar entre nuestros commits, es decir, ¡podemos viajar en el tiempo! Usando nuestro número de commit con el comando `git checkout 709a` para saltar atrás en el tiempo sin perder nuestro nuevo archivo.
![](Images/Day35_Git17.png)
But then equally we will want to move forward as well and we can do this the same way with the commit number or you can see here we are using the `git switch -` command to undo our operation.
Igualmente podemos avanzar de la misma manera, con el número de commit. También puedes ver que estamos usando el comando `git switch -` para deshacer nuestra operación.
![](Images/Day35_Git18.png)
The TLDR;
El TLDR;
- Tracking a project's history
- Managing multiple versions of a project
- Sharing code amongst developers and a wider scope of teams and tools
- Coordinating teamwork
- Oh and there is some time travel!
- Seguimiento de la historia de un proyecto.
- Gestión de múltiples versiones de un proyecto.
- Compartir código entre desarrolladores. Un mayor número de equipos y herramientas.
- Coordinar el trabajo en equipo.
- Ah, ¡y hay algunos viajes en el tiempo!
This might have seemed a jump around but hopefully, you can see without really knowing the commands used the powers and the big picture behind Version Control.
Esto ha sido una introducción, espero que se pueda percibir los poderes y el panorama general detrás del Control de Versiones.
Next up we will be getting git installed and set up on your local machine and diving a little deeper into some other use cases and commands that we can achieve in Git.
A continuación vamos a instalar git y configurarlo en una máquina local y bucear un poco más profundo en algunos casos de uso y los comandos que podemos necesitar en Git.
## Resources
## Recursos
- [What is Version Control?](https://www.youtube.com/watch?v=Yc8sCSeMhi4)
- [Types of Version Control System](https://www.youtube.com/watch?v=kr62e_n6QuQ)
@ -126,5 +126,13 @@ Next up we will be getting git installed and set up on your local machine and di
- [Git for Professionals Tutorial](https://www.youtube.com/watch?v=Uszj_k0DGsg)
- [Git and GitHub for Beginners - Crash Course](https://www.youtube.com/watch?v=RGOj5yH7evk&t=8s)
- [Complete Git and GitHub Tutorial](https://www.youtube.com/watch?v=apGV9Kg7ics)
- [En español] [Comandos Git](https://gitea.vergaracarmona.es/man-linux/comandos-git)
- [En español] [Apuntes Curso de Git](https://vergaracarmona.es/wp-content/uploads/2022/10/Curso-git_vergaracarmona.es_.pdf).
- [En español] En los [apuntes](https://vergaracarmona.es/apuntes/) del traductor:
- ["Instalar git en ubuntu"](https://vergaracarmona.es/instalar-git-en-ubuntu/)
- ["Comandos de git"](https://vergaracarmona.es/comandos-de-git/)
- ["Estrategias de fusión en git: Ship / Show / Ask"](https://vergaracarmona.es/estrategias-bifurcacion-git-ship-show-ask/)
- ["Resolver conflictos en Git. Merge, Squash, Rebase o Pull"](https://vergaracarmona.es/merge-squash-rebase-pull/)
- ["Borrar commits de git: reset, rebase y cherry-pick"](https://vergaracarmona.es/reset-rebase-cherry-pick/)
See you on [Day 36](day36.md)
Nos vemos en el [Día 36](day36.md)