Skip to content

Commit

Permalink
correct lint md errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mkgharbi-aneo committed Dec 9, 2024
1 parent 56ed2a5 commit 4675d83
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 24 deletions.
5 changes: 3 additions & 2 deletions .docs/content/1.installation/3.aws/0. aws-first-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This guide will help you install and configure the AWS CLI on your system and set up your AWS environment for use.

## 1. Installation & Configuration
## 1. Installation & Configuration

Follow the official AWS CLI install guide [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).

Expand All @@ -15,6 +15,7 @@ sudo ./aws/install
```

Ensure the AWS CLI is installed correctly by checking its version:

```bash
aws --version
```
Expand Down Expand Up @@ -60,4 +61,4 @@ gio: https://oidc.us-east-1.amazonaws.com/authorize?response_type=code&client_id
- Once authorized, the CLI will confirm successful login.
- Your authorization page should look similar to this:

![AWS CLI Access](./aws-cli-access.png)
![AWS CLI Access](./aws-cli-access.png)
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,28 @@ default = {
- Check Spelling in Configuration Files.
- Double-check for any typos in partition names or configurations. Even minor spelling mistakes can cause the error.

For example in **parameters.tfvars**:
For example in **parameters.tfvars**:

```hcl
default = {
node_selector = { service = "workers" }
replicas = 1 # HERE
```

instead of
instead of

```hcl
defautl = {
node_selector = { service = "workers" }
replicas = 1 # HERE
```

## 2. Error: Incorrect URL or Missing Endpoint

If your application fails to connect to a service, verify the following:
### Use the Correct URL Generated by AWS:

### Use the Correct URL Generated by AWS

After deploying your application or service, AWS typically generates a URL for the *control_plane* or other services. Make sure to:

Expand Down Expand Up @@ -86,25 +88,28 @@ Voici la documentation mise à jour pour inclure la gestion des erreurs liées a

If you encounter an error related to the Docker image not being found or incorrectly configured, follow these steps to ensure the image is built and referenced correctly.

**Ensure the Worker Image is Built Correctly**
Ensure the Worker Image is Built Correctly

You need to build the Docker image for the worker using the following command:
```

```bash
docker build -f "./csharp/native/LinearSubTasking/Worker/Dockerfile" -t subtasking "./csharp/native/"
```
- **-f**: Specifies the path to the Dockerfile for your worker.
- **-t subtasking**: Tags the image as subtasking, which will be used as the image name.

- **-f**: Specifies the path to the Dockerfile for your worker.
- **-t subtasking**: Tags the image as subtasking, which will be used as the image name.
- **"./csharp/native/"**: Specifies the context for the build (i.e., the root directory containing your source files).

### Verify the Image Tag Matches the Configuration

The image name (**subtasking** in this case) must match the value specified in your Terraform parameters file (**parameters.tfvars**). Check the following:

1. Open the **parameters.tfvars** file.
2. Look for the worker_image:
2. Look for the worker_image:

```hcl
worker = [
{
image = "subtasking"
...
```
```
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# GCP all in one deployment Guide
# GCP All-in-One Deployment Guide

This guide will help you deploy your Armonik project on Google Cloud Platform (GCP).
This guide will help you deploy your ArmoniK project on Google Cloud Platform (GCP).

## Step 1: Preparation

#### 1. Install Google CLI
### 1. Install Google CLI

When receiving your credentials (email and password).
Download and install the Google CLI by following the instructions on the [following link](https://cloud.google.com/sdk/docs/install?hl=fr#deb)

#### 2. Initial Setup
### 2. Initial Setup

After installation, authenticate using the provided credentials (email and password) and select the project you want to deploy the resources to.
Follow [following tutorial](https://cloud.google.com/docs/authentication/provide-credentials-adc?hl=fr#how-to) to authenticate into the CLI.
Expand Down Expand Up @@ -37,8 +37,10 @@ Once authenticated, you should see a confirmation page with the message:
*You are now authenticated with the gcloud CLI!*

## Step 2: Deployment

Navigate to the **gcp folder** (infrastructure/quick-deploy/gcp) and follow the steps below to deploy your resources.
### 1. Boostrap

### 1. Bootstrap

Generate a prefix key ready in the GCP environment to deploy your resources.

Expand All @@ -58,7 +60,7 @@ make deploy PREFIX=<PREFIX_KEY>

### 1. Destroy the deployment

#### Attention: After using the deployment, you have to make sure to destroy it to avoid any additional costs. ####
- Attention: After using the deployment, you have to make sure to destroy it to avoid any additional costs.

To destroy the deployment, use the following command:

Expand Down
21 changes: 14 additions & 7 deletions .docs/content/1.installation/4.gcp/1. gcp-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This guide will help you troubleshoot common issues when deploying your Armonik project on Google Cloud Platform (GCP).

## 1. Deployment Error with New Partition

If you encounter an error during deployment after adding a new partition with the value `replicas > 0`, follow these steps:
1. Set the replicas to `0`.
2. Redeploy the resources.
Expand All @@ -12,9 +13,11 @@ If you encounter an error during deployment after adding a new partition with th
---

## 2. Pub/Sub Client-Side Issue

If you encounter an issue with the Pub/Sub client and see the error message: `FAILED_PRECONDITION: Requested entity was not found.`, follow the steps below to resolve the issue.

### Error Message

When running the application, you may encounter the following error:

```bash
Expand All @@ -31,15 +34,17 @@ grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
```
### Problem Description
This error occurs because Cloud Pub/Sub requires access to the specified CMEK to encrypt or decrypt messages. The service account used by Pub/Sub does not have the **Cloud KMS CryptoKey Encrypter/Decrypter** role for the specified CryptoKey.
### Key Components in the Error:
### Key Components in the Error
- **Service Account**: `service-[NUMERIC_ID]@gcp-sa-pubsub.iam.gserviceaccount.com`
- **CryptoKey Resource**:
- Project: `[PROJECT_ID]`
- Location: `[LOCATION]` (e.g., `europe-west1`)
- Key Ring: `[KEY_RING]`
- CryptoKey: `[CRYPTO_KEY]`
- **CryptoKey Resource**:
- Project: `[PROJECT_ID]`
- Location: `[LOCATION]` (e.g., `europe-west1`)
- Key Ring: `[KEY_RING]`
- CryptoKey: `[CRYPTO_KEY]`
- **Missing Role**: `roles/cloudkms.cryptoKeyEncrypterDecrypter`
Without this role, Cloud Pub/Sub cannot perform encryption or decryption using the CMEK.
Expand All @@ -49,12 +54,15 @@ Without this role, Cloud Pub/Sub cannot perform encryption or decryption using t
To resolve the issue, grant the **Cloud KMS CryptoKey Encrypter/Decrypter** role to the Pub/Sub service account for the specified CryptoKey.
#### Step 1: Identify the Service Account
The service account mentioned in the error typically has the format: `service-[NUMERIC_ID]@gcp-sa-pubsub.iam.gserviceaccount.com`. This service account is automatically created by Google Cloud to manage Pub/Sub operations.
#### Step 2: Grant the Necessary Role
You can grant the **Cloud KMS CryptoKey Encrypter/Decrypter** role to the service account using the Google Cloud Console or the gcloud command-line tool.
##### Using the Google Cloud Console
1. Open the [Google Cloud Console](https://console.cloud.google.com).
2. Navigate to **Key Management > CryptoKeys**.
3. Locate the CryptoKey resource:
Expand All @@ -71,4 +79,3 @@ You can grant the **Cloud KMS CryptoKey Encrypter/Decrypter** role to the servic
---
After granting the role, Cloud Pub/Sub should be able to access the specified CMEK for encryption and decryption operations. Retry the operation that triggered the error. Ensure that the deployment is successful and verify that the Pub/Sub client can now access the CMEK without any issues.

0 comments on commit 4675d83

Please sign in to comment.