-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Manuel Morejon <5578317+mmorejon@users.noreply.github.com>
- Loading branch information
Showing
10 changed files
with
590 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
title: "Setup Jenkins X" | ||
linkTitle: "Setup Jenkins X" | ||
title: "Configurar Jenkins X" | ||
linkTitle: "Configurar Jenkins X" | ||
weight: 1 | ||
description: > | ||
How to setup Jenkins X? | ||
¿Cómo configurar Jenkins X? | ||
--- | ||
|
18 changes: 18 additions & 0 deletions
18
content/es/docs/getting-started/setup/create-cluster/_index.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
title: Crear clúster | ||
linktitle: Crear clúster | ||
description: ¿Como crear un clúster de Kubernetes? | ||
categories: [getting started] | ||
keywords: [cluster] | ||
weight: 1 | ||
aliases: | ||
- /getting-started/create-cluster | ||
--- | ||
|
||
Jenkins X necesita que exista un clúster de Kubernetes para que pueda instalarse mediante el [jx boot](/docs/getting-started/setup/boot/). | ||
|
||
Existen varios enfoques para crear grupos de Kubernetes. | ||
|
||
Nuestra recomendación es usar [Terraform](https://www.terraform.io) para configurar toda su infraestructura en la nube (clúster de kubernetes, cuentas de servicio, almacenamiento, registro, etc.) y utilizar un proveedor de la nube para crear y administrar sus clústeres de kubernetes. | ||
|
||
O puede utilizar un enfoque específico de proveedor de kubernetes: |
37 changes: 37 additions & 0 deletions
37
content/es/docs/getting-started/setup/create-cluster/amazon/_index.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: Amazon | ||
linktitle: Amazon | ||
description: ¿Como crear un clúster de Kubernetes? en Amazon (AWS)? | ||
weight: 40 | ||
--- | ||
|
||
Existen deferentes maneras de configurar clústeres en Amazon: | ||
|
||
## Utilizando EKS y eksctl | ||
|
||
Si deseas EKS en AWS, entonces la herramienta preferida es [eksctl](https://eksctl.io). | ||
|
||
Primero debes instalar [eksctl CLI](https://eksctl.io/introduction/installation/). | ||
|
||
Luego sigue las instruciones para [crear un clúster EKS con eksctl](https://eksctl.io/usage/creating-and-managing-clusters/). | ||
|
||
## Using EC2 and kops | ||
|
||
If you wish to use EC2 and kops then you will need to download a [kops release](https://github.com/kubernetes/kops/releases). | ||
Then follow the instructions to [create a cluster on AWS with kops](https://kubernetes.io/docs/setup/production-environment/tools/kops/). | ||
|
||
|
||
## Using the jx CLI | ||
|
||
Ensure you [have installed the jx CLI](/docs/getting-started/setup/install/) then for kops use: | ||
|
||
|
||
```sh | ||
jx create cluster aws --skip-installation | ||
``` | ||
|
||
or for EKS use: | ||
|
||
```sh | ||
jx create cluster eks --skip-installation | ||
``` |
179 changes: 179 additions & 0 deletions
179
content/es/docs/getting-started/setup/create-cluster/amazon/terraform.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
--- | ||
title: Create EKS cluster with Terraform | ||
linktitle: Terraform | ||
description: How to setup EKS cluster and other requirements in AWS with Terraform and install Jenkins X on it | ||
date: 2019-04-03 | ||
publishdate: 2019-04-03 | ||
lastmod: 2019-04-03 | ||
categories: [getting started] | ||
keywords: [install,kubernetes,aws,terraform] | ||
weight: 65 | ||
--- | ||
|
||
This is a short guide to setup EKS on AWS and the required resources for Jenkins X's setup of Vault | ||
using Terraform. It assumes access to AWS is configured and familiarity with AWS, kubectl and Terraform. | ||
|
||
This snippet of Terraform code sets EKS and up needed resources on AWS. It outputs the parameters | ||
you then need to add to append to `jx install`. | ||
|
||
```tf | ||
variable "region" { | ||
} | ||
variable "subnets" { | ||
type = "list" | ||
} | ||
variable "vpc_id" { | ||
} | ||
variable "key_name" { | ||
description = "SSH key name for worker nodes" | ||
} | ||
variable "bucket_domain" { | ||
description = "Suffix for S3 bucket used for vault unseal operation" | ||
} | ||
provider "aws" { | ||
region = "${var.region}" | ||
} | ||
module "eks" { | ||
source = "terraform-aws-modules/eks/aws" | ||
cluster_name = "${var.region}" | ||
subnets = "${var.subnets}" | ||
vpc_id = "${var.vpc_id}" | ||
worker_groups = [ | ||
{ | ||
autoscaling_enabled = true | ||
asg_min_size = 3 | ||
asg_desired_capacity = 3 | ||
instance_type = "t3.large" | ||
asg_max_size = 20 | ||
key_name = "${var.key_name}" | ||
} | ||
] | ||
version = "5.0.0" | ||
} | ||
# Needed for cluster-autoscaler | ||
resource "aws_iam_role_policy_attachment" "workers_AmazonEC2ContainerRegistryPowerUser" { | ||
policy_arn = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPowerUser" | ||
role = "${module.eks.worker_iam_role_name}" | ||
} | ||
# Create S3 bucket for KMS | ||
resource "aws_s3_bucket" "vault-unseal" { | ||
bucket = "vault-unseal.${var.region}.${var.bucket_domain}" | ||
acl = "private" | ||
versioning { | ||
enabled = false | ||
} | ||
} | ||
# Create KMS key | ||
resource "aws_kms_key" "bank_vault" { | ||
description = "KMS Key for bank vault unseal" | ||
} | ||
# Create DynamoDB table | ||
resource "aws_dynamodb_table" "vault-data" { | ||
name = "vault-data" | ||
read_capacity = 2 | ||
write_capacity = 2 | ||
hash_key = "Path" | ||
range_key = "Key" | ||
attribute { | ||
name = "Path" | ||
type = "S" | ||
} | ||
attribute { | ||
name = "Key" | ||
type = "S" | ||
} | ||
} | ||
# Create service account for vault. Should the policy | ||
resource "aws_iam_user" "vault" { | ||
name = "vault_${var.region}" | ||
} | ||
data "aws_iam_policy_document" "vault" { | ||
statement { | ||
sid = "DynamoDB" | ||
effect = "Allow" | ||
actions = [ | ||
"dynamodb:DescribeLimits", | ||
"dynamodb:DescribeTimeToLive", | ||
"dynamodb:ListTagsOfResource", | ||
"dynamodb:DescribeReservedCapacityOfferings", | ||
"dynamodb:DescribeReservedCapacity", | ||
"dynamodb:ListTables", | ||
"dynamodb:BatchGetItem", | ||
"dynamodb:BatchWriteItem", | ||
"dynamodb:CreateTable", | ||
"dynamodb:DeleteItem", | ||
"dynamodb:GetItem", | ||
"dynamodb:GetRecords", | ||
"dynamodb:PutItem", | ||
"dynamodb:Query", | ||
"dynamodb:UpdateItem", | ||
"dynamodb:Scan", | ||
"dynamodb:DescribeTable" | ||
] | ||
resources = ["${aws_dynamodb_table.vault-data.arn}"] | ||
} | ||
statement { | ||
sid = "S3" | ||
effect = "Allow" | ||
actions = [ | ||
"s3:PutObject", | ||
"s3:GetObject" | ||
] | ||
resources = ["${aws_s3_bucket.vault-unseal.arn}/*"] | ||
} | ||
statement { | ||
sid = "S3List" | ||
effect = "Allow" | ||
actions = [ | ||
"s3:ListBucket" | ||
] | ||
resources = ["${aws_s3_bucket.vault-unseal.arn}"] | ||
} | ||
statement { | ||
sid = "KMS" | ||
effect = "Allow" | ||
actions = [ | ||
"kms:Encrypt", | ||
"kms:Decrypt", | ||
"kms:DescribeKey" | ||
] | ||
resources = ["${aws_kms_key.bank_vault.arn}"] | ||
} | ||
} | ||
resource "aws_iam_user_policy" "vault" { | ||
name = "vault_${var.region}" | ||
user = "${aws_iam_user.vault.name}" | ||
policy = "${data.aws_iam_policy_document.vault.json}" | ||
} | ||
resource "aws_iam_access_key" "vault" { | ||
user = "${aws_iam_user.vault.name}" | ||
} | ||
# Output KMS key id, S3 bucket name and secret name in the form of jx install options | ||
output "jx_params" { | ||
value = "--provider=eks --gitops --no-tiller --vault --aws-dynamodb-region=${var.region} --aws-dynamodb-table=${aws_dynamodb_table.vault-data.name} --aws-kms-region=${var.region} --aws-kms-key-id=${aws_kms_key.bank_vault.key_id} --aws-s3-region=${var.region} --aws-s3-bucket=${aws_s3_bucket.vault-unseal.id} --aws-access-key-id=${aws_iam_access_key.vault.id} --aws-secret-access-key=${aws_iam_access_key.vault.secret}" | ||
} | ||
``` | ||
|
||
Save as `eks.tf` | ||
|
||
The module terraform-aws-modules/eks/aws will also store a kubeconfig file as `config`. This can be | ||
copied to or merged with your `~/.kube/config`. Then `jx install` can be run with the parameters | ||
output by the Terraform config above. |
15 changes: 15 additions & 0 deletions
15
content/es/docs/getting-started/setup/create-cluster/azure.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Azure | ||
linktitle: Azure | ||
description: How to create a kubernetes cluster on Azure? | ||
weight: 40 | ||
--- | ||
|
||
You may find [this blog helpful](https://cloudblogs.microsoft.com/opensource/2019/03/06/jenkins-x-azure-kubernetes-service-setup/). | ||
|
||
|
||
Otherwise ensure you [have installed the jx CLI](/docs/getting-started/setup/install/) then run: | ||
|
||
```sh | ||
jx create cluster aks --skip-installation | ||
``` |
51 changes: 51 additions & 0 deletions
51
content/es/docs/getting-started/setup/create-cluster/google.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: Google | ||
linktitle: Google | ||
description: How to create a kubernetes cluster on the Google Cloud Platform (GCP)? | ||
weight: 50 | ||
--- | ||
|
||
|
||
## Using the Google Cloud Console | ||
|
||
You can create Kubernetes clusters in a few clicks on the [Google Cloud Console](https://console.cloud.google.com/). | ||
|
||
First make sure you have created/selected a Project: | ||
|
||
<img src="/images/quickstart/gke-select-project.png" class="img-thumbnail"> | ||
|
||
|
||
Now you can click the `create cluster` button on the [kubernetets clusters](https://console.cloud.google.com/kubernetes/list) page or try [create cluster](https://console.cloud.google.com/kubernetes/add). | ||
|
||
|
||
|
||
## Using gcloud | ||
|
||
The CLI tool for working with google cloud is called `gcloud`. If you have not done so already please [install gcloud](https://cloud.google.com/sdk/install). | ||
|
||
To create a cluster with gcloud [follow these instructions](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster). | ||
|
||
|
||
## Using Google Cloud Shell | ||
|
||
To avoid having to install `gcloud` you can use the [Google Cloud Shell](https://console.cloud.google.com/) as it already comes with most of the things you may need to install (`git, gcloud, kubectl` etc). | ||
|
||
First you need to open the Google Cloud Shell via the button in the toolbar: | ||
|
||
<img src="/images/quickstart/gke-start-shell.png" class="img-thumbnail"> | ||
|
||
You can then create a cluster with `gcloud` by [following these instructions](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster). | ||
|
||
## Connecting to your cluster | ||
|
||
Once you have created a cluster, you need to connect to it so you can access it via the `kubectl` or [jx](/docs/getting-started/setup/install/) command line tools. | ||
|
||
To do this click on the `Connect` button on the [Kubernetes Engine page](https://console.cloud.google.com/kubernetes/list) in the [Google Console](https://console.cloud.google.com/). | ||
|
||
<img src="/images/quickstart/gke-connect.png" class="img-thumbnail"> | ||
|
||
You should now be able to use the `kubectl` and `jx` CLI tools on your laptop to talk to the GKE cluster. e.g. this command should list the nodes in your cluster: | ||
|
||
```sh | ||
kubectl get node | ||
``` |
Oops, something went wrong.