From a2baa660a29e21c3e57104e15aa0ac0781c10a09 Mon Sep 17 00:00:00 2001 From: curquiza Date: Thu, 16 Jan 2025 15:33:21 +0100 Subject: [PATCH] Remove GCP --- .github/workflows/manual_publish.yml | 7 +------ .github/workflows/publish.yml | 8 ++----- CONTRIBUTING.md | 31 ---------------------------- README.md | 14 ++----------- meilisearch.pkr.hcl | 21 ------------------- 5 files changed, 5 insertions(+), 76 deletions(-) diff --git a/.github/workflows/manual_publish.yml b/.github/workflows/manual_publish.yml index 078a5fd..dde5676 100644 --- a/.github/workflows/manual_publish.yml +++ b/.github/workflows/manual_publish.yml @@ -9,7 +9,6 @@ on: options: - "amazon-ebs" - "digitalocean" - - "googlecompute" required: true env: @@ -25,10 +24,6 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: 'google-github-actions/auth@v2' - with: - credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' - - name: Setup `packer` uses: hashicorp/setup-packer@main with: @@ -36,6 +31,6 @@ jobs: - name: Run `packer init` run: "packer init ." - + - name: Run `packer build` run: "packer build -only ${{ github.event.inputs.provider }}.debian ." diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e8f7e97..155dcf2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,10 +18,6 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: 'google-github-actions/auth@v2' - with: - credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' - - name: Setup `packer` uses: hashicorp/setup-packer@main with: @@ -29,9 +25,9 @@ jobs: - name: Run `packer init` run: "packer init ." - + - name: Run `packer validate` run: "packer validate ." - + - name: Run `packer build` run: "packer build ." diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2d277dc..6fd84c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,15 +42,6 @@ Before running any script, make sure to [obtain a DigitalOcean API Token](https: ```bash export DIGITALOCEAN_ACCESS_TOKEN="XxXxxxxXXxxXXxxXXxxxXXXxXxXxXX" ``` -- GCP: -Obtain your [GCP credentials](https://cloud.google.com/docs/authentication/getting-started) and set it in your environment: - ```bash - export GOOGLE_APPLICATION_CREDENTIALS="path_to_your_creadential_file.json" - ``` -3. Download and install Packer plugins - ``` bash - packer init . - ``` ### Tests and Linter @@ -190,21 +181,6 @@ In the [DigitalOcean Vendor Portal](https://cloud.digitalocean.com/vendorportal) This will start the DigitalOcean review process. This can take a few days, and the result will be notified via email to the DigitalOcean admin account. If the image is accepted, it will be automatically published on the Marketplace. If it is rejected, an email explaining the problems will be sent to administrators. -### Create the Virtual disk (VMDK) for GCP - -In the [GCP console](https://console.cloud.google.com/) - -- Ensure you selected the `MeiliSearchImage` project in the GCP console -- Navigate to "Compute Engine" -> "Images" -- Click on the image you just created `meilisearch-X-X-X-debian-X` -- Click on `EXPORT` -- On: "Export format" choose `VMDK` -- On: "Path*" click on `BROWSE` and select `meilisearch-image` -- Validate it by clicking on the SELECT button at the bottom -- Finally click on the EXPORT button at the buttom - -The new image should appear in the list. It might take a few minutes. - ## Cleaning old images (Optional) You may want to clean up the old images. @@ -218,13 +194,6 @@ However if you have made a copy so that it is available from the dashboard: - Go to Images -> Manage (left side bar) - On the list of image, for the chosen image, click on `More` -> `Delete` -### GCP - -- Go to Cloud-storage: [GCP console](https://console.cloud.google.com/) > Cloud Storage -- Click on `meilisearch-image``. You will have access to a list of all vdmk images -- Select the images you wish to delete -- Click on DELETE (at top of the list) - ### AWS - Download this [repository](https://github.com/meilisearch/meilisearch-aws) (don't worry it's an archived repository but we can still use the script) diff --git a/README.md b/README.md index 108245a..8a05bf5 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ These Packer build configurations are used primarily by the Meilisearch integrat |----------| | AWS | | DigitalOcean | -| GCP | +| GCP - ⚠️ Deprecated, no more image published anymore | ## 📖 Documentation @@ -62,7 +62,6 @@ You need the following to run the template: 1. The [Packer CLI v1.8.6+](https://developer.hashicorp.com/packer/downloads) installed locally 2. Obtain your [AWS access keys](https://docs.aws.amazon.com/keyspaces/latest/devguide/access.credentials.html) 3. Obtain your [DigitalOcean API Token](https://www.digitalocean.com/docs/apis-clis/api/create-personal-access-token/) -4. Obtain your [GCP credentials](https://cloud.google.com/docs/authentication/application-default-credentials) ## 🔑 Set your credentials @@ -75,10 +74,6 @@ export AWS_SECRET_ACCESS_KEY="YOUR_SECRET_KEY" ```bash export DIGITALOCEAN_TOKEN="XxXxxxxXXxxXXxxXXxxxXXXxXxXxXX" ``` -- GCP -```bash -export GOOGLE_APPLICATION_CREDENTIALS="path_to_your_creadential_file.json" -``` ## 🚀 Getting Started @@ -109,14 +104,9 @@ packer build -only 'amazon-ebs.*' . packer build -only 'digitalocean.*' . ``` -``` bash -packer build -only 'googlecompute.*' . -``` - -## 🚀 How to deploy Meilisearch +## 🚀 How to deploy Meilisearch If you want to learn how to deploy a Meilisearch instance on DigitalOcean visit the dedicated page of our documentation: - [AWS](https://www.meilisearch.com/docs/guides/deployment/aws) - [DigitalOcean](https://www.meilisearch.com/docs/guides/deployment/digitalocean) -- [GCP](https://www.meilisearch.com/docs/guides/deployment/gcp) diff --git a/meilisearch.pkr.hcl b/meilisearch.pkr.hcl index d829a9a..f2e6985 100644 --- a/meilisearch.pkr.hcl +++ b/meilisearch.pkr.hcl @@ -23,10 +23,6 @@ packer { version = "~> 1" source = "github.com/digitalocean/digitalocean" } - googlecompute = { - version = "~> 1" - source = "github.com/hashicorp/googlecompute" - } } } @@ -88,19 +84,10 @@ source "digitalocean" "debian" { ] } -source "googlecompute" "debian" { - image_name = lower(replace("${var.image_name}-${var.meilisearch_version}-${var.base-os-version}", ".", "-")) - project_id = "meilisearchimage" - source_image_family = "debian-11" - ssh_username = "packer" - zone = "us-central1-a" -} - build { sources = [ "source.amazon-ebs.debian", "source.digitalocean.debian", - "source.googlecompute.debian" ] provisioner "file" { @@ -167,12 +154,4 @@ build { only = ["digitalocean.debian"] } - // This prevents image creation failure when Install guest packages is checked. - provisioner "shell" { - execute_command = "echo 'packer' | sudo -S sh -c '{{ .Vars }} {{ .Path }}'" - inline = [ - "sudo apt-get remove google-cloud-cli -y", - ] - only = ["googlecompute.debian"] - } }