From bacae7ecdbbac59a280ca645cc6e24e768f8c1d1 Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Tue, 11 Jun 2024 17:35:44 +0200 Subject: [PATCH] chore: rebranding to mapt on redhat-developer org Signed-off-by: Adrian Riobo Lorenzo --- .github/workflows/build-oci.yaml | 4 +- Makefile | 12 +-- README.md | 14 ++-- cmd/cmd/aws/aws.go | 2 +- cmd/cmd/aws/hosts/fedora.go | 12 +-- cmd/cmd/aws/hosts/mac.go | 10 +-- cmd/cmd/aws/hosts/rhel.go | 12 +-- cmd/cmd/aws/hosts/windows.go | 12 +-- cmd/cmd/aws/replica/replica.go | 6 +- cmd/cmd/azure/azure.go | 2 +- cmd/cmd/azure/hosts/windows.go | 14 ++-- cmd/cmd/root.go | 14 ++-- cmd/main.go | 2 +- docs/aws.md | 24 +++--- docs/aws/fedora.md | 10 +-- docs/aws/mac.drawio | 6 +- docs/aws/mac.md | 16 ++-- docs/aws/mac.svg | 2 +- docs/aws/rhel.md | 10 +-- docs/aws/windows.md | 14 ++-- docs/azure.md | 10 +-- go.mod | 2 +- hacks/azure/azure_setup.sh | 12 +-- oci/Containerfile | 6 +- pkg/manager/context/context.go | 8 +- pkg/manager/manager.go | 4 +- pkg/manager/util.go | 4 +- pkg/provider/aws/action/fedora/fedora.go | 42 +++++----- pkg/provider/aws/action/mac/mac-dh.go | 28 +++---- pkg/provider/aws/action/mac/mac-machine.go | 50 ++++++------ pkg/provider/aws/action/mac/mac.go | 22 +++--- pkg/provider/aws/action/mac/types.go | 2 +- pkg/provider/aws/action/mac/util.go | 18 ++--- pkg/provider/aws/action/rhel/rhel.go | 44 +++++------ pkg/provider/aws/action/windows/windows.go | 48 ++++++------ pkg/provider/aws/aws.go | 22 +++--- pkg/provider/aws/data/ami.go | 2 +- pkg/provider/aws/data/azs.go | 4 +- pkg/provider/aws/data/dedicatedhost.go | 2 +- pkg/provider/aws/data/instance.go | 2 +- pkg/provider/aws/data/regions.go | 2 +- pkg/provider/aws/modules/ami/ami.go | 8 +- pkg/provider/aws/modules/ami/stack.go | 36 ++++----- pkg/provider/aws/modules/bastion/bastion.go | 18 ++--- .../aws/modules/ec2/compute/compute.go | 16 ++-- .../aws/modules/network/airgap/airgap.go | 4 +- pkg/provider/aws/modules/network/network.go | 8 +- .../aws/modules/network/standard/stack.go | 6 +- .../aws/modules/network/standard/standard.go | 6 +- pkg/provider/aws/modules/spot/spot.go | 6 +- pkg/provider/aws/modules/spot/stack.go | 32 ++++---- pkg/provider/aws/services/ec2/ami/ami.go | 2 +- .../aws/services/ec2/keypair/keypair.go | 4 +- .../services/ec2/security-group/defaults.go | 2 +- .../ec2/security-group/security-group.go | 6 +- .../aws/services/vpc/subnet/private.go | 8 +- .../aws/services/vpc/subnet/public.go | 10 +-- pkg/provider/aws/services/vpc/vpc/vpc.go | 10 +-- pkg/provider/azure/action/windows/windows.go | 78 +++++++++---------- pkg/provider/azure/azure.go | 4 +- .../azure/module/spot-price/spot-price.go | 4 +- pkg/provider/util/output/output.go | 2 +- pkg/provider/util/windows/windows.go | 2 +- pkg/util/resources/resources.go | 6 +- tkn/infra-aws-fedora.yaml | 8 +- tkn/infra-aws-mac.yaml | 8 +- tkn/infra-aws-rhel.yaml | 8 +- tkn/infra-aws-windows-server.yaml | 8 +- tkn/infra-azure-windows-desktop.yaml | 10 ++- tools/go.mod | 2 +- 70 files changed, 430 insertions(+), 424 deletions(-) diff --git a/.github/workflows/build-oci.yaml b/.github/workflows/build-oci.yaml index c0ff9697..650cfacf 100644 --- a/.github/workflows/build-oci.yaml +++ b/.github/workflows/build-oci.yaml @@ -9,8 +9,8 @@ on: branches: [ main ] jobs: - build-qenvs: - name: build-qenvs + build-mapt: + name: build-mapt runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/Makefile b/Makefile index 9c856fb1..7ad6e2c4 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ VERSION ?= 0.7.0-dev CONTAINER_MANAGER ?= podman # Image URL to use all building/pushing image targets -IMG ?= quay.io/rhqp/qenvs:v${VERSION} -TKN_IMG ?= quay.io/rhqp/qenvs-tkn:v${VERSION} +IMG ?= quay.io/redhat-developer/mapt:v${VERSION} +TKN_IMG ?= quay.io/redhat-developer/mapt:v${VERSION}-tkn # Go and compilation related variables GOPATH ?= $(shell go env GOPATH) @@ -35,11 +35,11 @@ check: build test lint install: $(SOURCES) go install -ldflags="$(LDFLAGS)" $(GO_EXTRA_BUILDFLAGS) ./cmd -$(BUILD_DIR)/qenvs: $(SOURCES) - GOOS=linux GOARCH=amd64 go build -gcflags="$(GCFLAGS)" -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/qenvs $(GO_EXTRA_BUILDFLAGS) ./cmd +$(BUILD_DIR)/mapt: $(SOURCES) + GOOS=linux GOARCH=amd64 go build -gcflags="$(GCFLAGS)" -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/mapt $(GO_EXTRA_BUILDFLAGS) ./cmd .PHONY: build -build: $(BUILD_DIR)/qenvs +build: $(BUILD_DIR)/mapt .PHONY: test test: @@ -48,7 +48,7 @@ test: .PHONY: clean ## Remove all build artifacts clean: rm -rf $(BUILD_DIR) - rm -f $(GOPATH)/bin/qenvs + rm -f $(GOPATH)/bin/mapt .PHONY: fmt fmt: diff --git a/README.md b/README.md index b81462c9..bec1b6c8 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,19 @@ -# qenvs +# mapt -automation for qe environments using pulumi +This is a Multi Architecture Provisionig Tool -![code check](https://github.com/adrianriobo/qenvs/actions/workflows/build-go.yaml/badge.svg) -![oci builds](https://github.com/adrianriobo/qenvs/actions/workflows/build-oci.yaml/badge.svg) +It allows to spin multiple target environments across multiple cloud providers implementing multiple optimizations like cross data for spot price and eviction rates, or pre create snapshost to improve boot times, ...among others. + +![code check](https://github.com/redhat-developer/mapt/actions/workflows/build-go.yaml/badge.svg) +![oci builds](https://github.com/redhat-developer/mapt/actions/workflows/build-oci.yaml/badge.svg) ## Overview This project is intended to easily spin environments and plug them in on any CI/CD system through ssh. -Qenvs create the target machine and return the information and credentials required to connect within the target marchine (host + username + private key) +mapt create the target machine and return the information and credentials required to connect within the target marchine (host + username + private key) -Also Qenvs offers a set of features wich are transversal to each type of target machine as so they can be applied to any of them (airgap, proxyed, vpn,...) +Also mapt offers a set of features wich are transversal to each type of target machine as so they can be applied to any of them (airgap, proxyed, vpn,...) ## Supported environments diff --git a/cmd/cmd/aws/aws.go b/cmd/cmd/aws/aws.go index 4479fa4e..42d23cf6 100644 --- a/cmd/cmd/aws/aws.go +++ b/cmd/cmd/aws/aws.go @@ -1,7 +1,7 @@ package aws import ( - "github.com/adrianriobo/qenvs/cmd/cmd/aws/hosts" + "github.com/redhat-developer/mapt/cmd/cmd/aws/hosts" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/cmd/cmd/aws/hosts/fedora.go b/cmd/cmd/aws/hosts/fedora.go index 6c77f2e5..918fc6a1 100644 --- a/cmd/cmd/aws/hosts/fedora.go +++ b/cmd/cmd/aws/hosts/fedora.go @@ -1,10 +1,10 @@ package hosts import ( - params "github.com/adrianriobo/qenvs/cmd/cmd/constants" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws/action/fedora" - "github.com/adrianriobo/qenvs/pkg/util/logging" + params "github.com/redhat-developer/mapt/cmd/cmd/constants" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws/action/fedora" + "github.com/redhat-developer/mapt/pkg/util/logging" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" @@ -44,7 +44,7 @@ func getFedoraCreate() *cobra.Command { } // Initialize context - qenvsContext.Init( + maptContext.Init( viper.GetString(params.ProjectName), viper.GetString(params.BackedURL), viper.GetString(params.ConnectionDetailsOutput), @@ -81,7 +81,7 @@ func getFedoraDestroy() *cobra.Command { return err } - qenvsContext.InitBase( + maptContext.InitBase( viper.GetString(params.ProjectName), viper.GetString(params.BackedURL)) diff --git a/cmd/cmd/aws/hosts/mac.go b/cmd/cmd/aws/hosts/mac.go index f19aefa3..15f5633b 100644 --- a/cmd/cmd/aws/hosts/mac.go +++ b/cmd/cmd/aws/hosts/mac.go @@ -1,10 +1,10 @@ package hosts import ( - params "github.com/adrianriobo/qenvs/cmd/cmd/constants" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws/action/mac" - "github.com/adrianriobo/qenvs/pkg/util/logging" + params "github.com/redhat-developer/mapt/cmd/cmd/constants" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws/action/mac" + "github.com/redhat-developer/mapt/pkg/util/logging" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" @@ -55,7 +55,7 @@ func getMacRequest() *cobra.Command { } // Initialize context - qenvsContext.Init( + maptContext.Init( viper.GetString(params.ProjectName), viper.GetString(params.BackedURL), viper.GetString(params.ConnectionDetailsOutput), diff --git a/cmd/cmd/aws/hosts/rhel.go b/cmd/cmd/aws/hosts/rhel.go index 284725f9..e144943a 100644 --- a/cmd/cmd/aws/hosts/rhel.go +++ b/cmd/cmd/aws/hosts/rhel.go @@ -1,10 +1,10 @@ package hosts import ( - params "github.com/adrianriobo/qenvs/cmd/cmd/constants" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws/action/rhel" - "github.com/adrianriobo/qenvs/pkg/util/logging" + params "github.com/redhat-developer/mapt/cmd/cmd/constants" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws/action/rhel" + "github.com/redhat-developer/mapt/pkg/util/logging" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" @@ -50,7 +50,7 @@ func getRHELCreate() *cobra.Command { } // Initialize context - qenvsContext.Init( + maptContext.Init( viper.GetString(params.ProjectName), viper.GetString(params.BackedURL), viper.GetString(params.ConnectionDetailsOutput), @@ -101,7 +101,7 @@ func getRHELDestroy() *cobra.Command { return err } - qenvsContext.InitBase( + maptContext.InitBase( viper.GetString(params.ProjectName), viper.GetString(params.BackedURL)) diff --git a/cmd/cmd/aws/hosts/windows.go b/cmd/cmd/aws/hosts/windows.go index acd5a2f6..a10e0b78 100644 --- a/cmd/cmd/aws/hosts/windows.go +++ b/cmd/cmd/aws/hosts/windows.go @@ -1,10 +1,10 @@ package hosts import ( - params "github.com/adrianriobo/qenvs/cmd/cmd/constants" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws/action/windows" - "github.com/adrianriobo/qenvs/pkg/util/logging" + params "github.com/redhat-developer/mapt/cmd/cmd/constants" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws/action/windows" + "github.com/redhat-developer/mapt/pkg/util/logging" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" @@ -55,7 +55,7 @@ func getWindowsCreate() *cobra.Command { } // Initialize context - qenvsContext.Init( + maptContext.Init( viper.GetString(params.ProjectName), viper.GetString(params.BackedURL), viper.GetString(params.ConnectionDetailsOutput), @@ -100,7 +100,7 @@ func getWindowsDestroy() *cobra.Command { return err } - qenvsContext.InitBase( + maptContext.InitBase( viper.GetString(params.ProjectName), viper.GetString(params.BackedURL)) diff --git a/cmd/cmd/aws/replica/replica.go b/cmd/cmd/aws/replica/replica.go index a26b43a2..45c4ba93 100644 --- a/cmd/cmd/aws/replica/replica.go +++ b/cmd/cmd/aws/replica/replica.go @@ -1,9 +1,9 @@ package replica import ( - params "github.com/adrianriobo/qenvs/cmd/cmd/constants" - amireplication "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/ami" - "github.com/adrianriobo/qenvs/pkg/util/logging" + params "github.com/redhat-developer/mapt/cmd/cmd/constants" + amireplication "github.com/redhat-developer/mapt/pkg/provider/aws/modules/ami" + "github.com/redhat-developer/mapt/pkg/util/logging" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" diff --git a/cmd/cmd/azure/azure.go b/cmd/cmd/azure/azure.go index 667044d8..5a3d39c9 100644 --- a/cmd/cmd/azure/azure.go +++ b/cmd/cmd/azure/azure.go @@ -1,7 +1,7 @@ package azure import ( - "github.com/adrianriobo/qenvs/cmd/cmd/azure/hosts" + "github.com/redhat-developer/mapt/cmd/cmd/azure/hosts" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/cmd/cmd/azure/hosts/windows.go b/cmd/cmd/azure/hosts/windows.go index d30eec90..436cf957 100644 --- a/cmd/cmd/azure/hosts/windows.go +++ b/cmd/cmd/azure/hosts/windows.go @@ -3,11 +3,11 @@ package hosts import ( "fmt" - params "github.com/adrianriobo/qenvs/cmd/cmd/constants" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - azureWindows "github.com/adrianriobo/qenvs/pkg/provider/azure/action/windows" - spotprice "github.com/adrianriobo/qenvs/pkg/provider/azure/module/spot-price" - "github.com/adrianriobo/qenvs/pkg/util/logging" + params "github.com/redhat-developer/mapt/cmd/cmd/constants" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + azureWindows "github.com/redhat-developer/mapt/pkg/provider/azure/action/windows" + spotprice "github.com/redhat-developer/mapt/pkg/provider/azure/module/spot-price" + "github.com/redhat-developer/mapt/pkg/util/logging" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" @@ -68,7 +68,7 @@ func getCreate() *cobra.Command { return err } // Initialize context - qenvsContext.Init( + maptContext.Init( viper.GetString(params.ProjectName), viper.GetString(params.BackedURL), viper.GetString(params.ConnectionDetailsOutput), @@ -126,7 +126,7 @@ func getDestroy() *cobra.Command { return err } // Initialize context - qenvsContext.Init( + maptContext.Init( viper.GetString(params.ProjectName), viper.GetString(params.BackedURL), viper.GetString(params.ConnectionDetailsOutput), diff --git a/cmd/cmd/root.go b/cmd/cmd/root.go index 503d0f45..6d4c57d5 100644 --- a/cmd/cmd/root.go +++ b/cmd/cmd/root.go @@ -7,16 +7,16 @@ import ( "path/filepath" "strings" - "github.com/adrianriobo/qenvs/cmd/cmd/aws" - "github.com/adrianriobo/qenvs/cmd/cmd/azure" - params "github.com/adrianriobo/qenvs/cmd/cmd/constants" - "github.com/adrianriobo/qenvs/pkg/util/logging" + "github.com/redhat-developer/mapt/cmd/cmd/aws" + "github.com/redhat-developer/mapt/cmd/cmd/azure" + params "github.com/redhat-developer/mapt/cmd/cmd/constants" + "github.com/redhat-developer/mapt/pkg/util/logging" "github.com/spf13/cobra" "github.com/spf13/pflag" ) const ( - commandName = "qenvs" + commandName = "mapt" descriptionShort = "PoC for pulumi" descriptionLong = "PoC for pulumi" @@ -24,8 +24,8 @@ const ( ) var ( - baseDir = filepath.Join(os.Getenv("HOME"), ".qenvs") - logFile = "qenvs.log" + baseDir = filepath.Join(os.Getenv("HOME"), ".mapt") + logFile = "mapt.log" ) var rootCmd = &cobra.Command{ diff --git a/cmd/main.go b/cmd/main.go index 384c4527..48e479ca 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,6 +1,6 @@ package main -import "github.com/adrianriobo/qenvs/cmd/cmd" +import "github.com/redhat-developer/mapt/cmd/cmd" func main() { cmd.Execute() diff --git a/docs/aws.md b/docs/aws.md index 3e5756bf..31e2015a 100644 --- a/docs/aws.md +++ b/docs/aws.md @@ -4,7 +4,7 @@ Create a composable environment with different qe target machines aggregated on ## Hosts -Current available features allow to create supported hosts on AWS using cmd `qenvs host create` current supported hosts: +Current available features allow to create supported hosts on AWS using cmd `mapt host create` current supported hosts: * RHEL (host id `ol-rhel`) * Fedora (host id `ol-fedora`) @@ -24,7 +24,7 @@ This module allows to check for best bid price on all regions, to request instan to check those requisites the module make use of spot placement scores based on machine requirements. Then best scores are crossed with lowers price from spot price history to pick the most valuable option. -Current use case is working on one machine but it will be exteded to analyze any required environment offered by qenvs (checking with all the machines included on a specific environment). +Current use case is working on one machine but it will be exteded to analyze any required environment offered by mapt (checking with all the machines included on a specific environment). Current information about supported machines can be checked at [support-matrix](./../pkg/infra/aws/support-matrix/matrix.go) @@ -33,11 +33,11 @@ Current information about supported machines can be checked at [support-matrix]( It creates / destroy supported hosts ready to be included within the CI/CD system. Features included within the offering: ```bash -podman run -it --rm quay.io/rhqp/qenvs:0.0.5 aws host create -h +podman run -it --rm quay.io/redhat-developer/mapt:0.7.0-dev aws host create -h create Usage: - qenvs aws host create [flags] + mapt aws host create [flags] Flags: --conn-details-output string path to export host connection information (host, username and privateKey) @@ -66,14 +66,14 @@ When running the container image it is required to pass the authetication inform ```bash # Create rhel host # Recommended this region us-east-1 -# https://github.com/adrianriobo/qenvs/issues/24 -podman run -d --name qenvs-rhel \ +# https://github.com/redhat-developer/mapt/issues/24 +podman run -d --name mapt-rhel \ -v ${PWD}:/workspace:z \ -e AWS_ACCESS_KEY_ID=XXX \ -e AWS_SECRET_ACCESS_KEY=XXX \ -e AWS_DEFAULT_REGION=us-east-1 \ - quay.io/rhqp/qenvs:0.0.5 aws host create \ - --project-name qenvs-rhel \ + quay.io/redhat-developer/mapt:0.7.0-dev aws host create \ + --project-name mapt-rhel \ --backed-url file:///workspace \ --conn-details-output /workspace \ --host-id ol-rhel \ @@ -86,13 +86,13 @@ The following is a snipped on how to destroy the resources: ```bash # Create rhel host # Recommended this region us-east-1 -# https://github.com/adrianriobo/qenvs/issues/24 -podman run -d --name qenvs-rhel \ +# https://github.com/redhat-developer/mapt/issues/24 +podman run -d --name mapt-rhel \ -v ${PWD}:/workspace:z \ -e AWS_ACCESS_KEY_ID=XXX \ -e AWS_SECRET_ACCESS_KEY=XXX \ -e AWS_DEFAULT_REGION=us-east-1 \ - quay.io/rhqp/qenvs:0.0.5 aws host destroy \ - --project-name qenvs-rhel \ + quay.io/redhat-developer/mapt:0.7.0-dev aws host destroy \ + --project-name mapt-rhel \ --backed-url file:///workspace ``` diff --git a/docs/aws/fedora.md b/docs/aws/fedora.md index 9c97274a..16faac0a 100644 --- a/docs/aws/fedora.md +++ b/docs/aws/fedora.md @@ -6,11 +6,11 @@ This actions will handle provision Fedora Cloud machines on dedicated hosts. Thi ## Create ```bash -qenvs aws fedora create -h +mapt aws fedora create -h create Usage: - qenvs aws fedora create [flags] + mapt aws fedora create [flags] Flags: --airgap if this flag is set the host will be created as airgap machine. Access will done through a bastion @@ -43,13 +43,13 @@ Global Flags: When running the container image it is required to pass the authetication information as variables(to setup AWS credentials there is a [helper script](./../../hacks/aws_setup.sh)), following a sample snipped on how to create an instance with default values: ```bash -podman run -d --name qenvs-rhel \ +podman run -d --name mapt-rhel \ -v ${PWD}:/workspace:z \ -e AWS_ACCESS_KEY_ID=XXX \ -e AWS_SECRET_ACCESS_KEY=XXX \ -e AWS_DEFAULT_REGION=us-east-1 \ - quay.io/rhqp/qenvs:0.0.6-dev aws fedora create \ - --project-name qenvs-fedora \ + quay.io/redhat-developer/mapt:0.7.0-dev aws fedora create \ + --project-name mapt-fedora \ --backed-url file:///workspace \ --conn-details-output /workspace ``` \ No newline at end of file diff --git a/docs/aws/mac.drawio b/docs/aws/mac.drawio index b0be7ea1..b5716113 100644 --- a/docs/aws/mac.drawio +++ b/docs/aws/mac.drawio @@ -4,7 +4,7 @@ - + @@ -124,7 +124,7 @@ - + @@ -136,7 +136,7 @@ - + diff --git a/docs/aws/mac.md b/docs/aws/mac.md index ec5f3c13..bde624ca 100644 --- a/docs/aws/mac.md +++ b/docs/aws/mac.md @@ -6,13 +6,13 @@ This actions will handle provision for Mac instances on AWS. Some key considerat * There is no spot market for mac machines * Machine (dedicated host) should be provisioned at least for 24 hours -qenvs will take care of: +mapt will take care of: -* Try to honor the AWS_DEFAULT_REGION to spin the mac machine and look for a random AZ on it to launch it. In case the machine is no offered on the region as long as flag for `--fixed-location` is not set qenvs will move the Machine to a region were it is offered. +* Try to honor the AWS_DEFAULT_REGION to spin the mac machine and look for a random AZ on it to launch it. In case the machine is no offered on the region as long as flag for `--fixed-location` is not set mapt will move the Machine to a region were it is offered. * Previous graph also applies when there is no capacity on an specific region. It could happen that a region offers the machine but there is no capacity under that circumstance it will dinamically move it to other region. -* As the machine will be active for 24 hours, qenvs will allow to spin multiple machines (only once at a time) during that period (i.e different OS versions, or setups like airgap or vpn connected machine). +* As the machine will be active for 24 hours, mapt will allow to spin multiple machines (only once at a time) during that period (i.e different OS versions, or setups like airgap or vpn connected machine). * (Future) Create a scheduled task to remove the machine after 24 hours to avoid missing resources. This will require using s3 as backed URL. @@ -21,11 +21,11 @@ qenvs will take care of: ## Create ```bash -qenvs aws mac create -h +mapt aws mac create -h create Usage: - qenvs aws mac create [flags] + mapt aws mac create [flags] Flags: --airgap if this flag is set the host will be created as airgap machine. Access will done through a bastion @@ -64,13 +64,13 @@ Global Flags: When running the container image it is required to pass the authetication information as variables(to setup AWS credentials there is a [helper script](./../../hacks/aws_setup.sh)), following a sample snipped on how to create an instance with default values: ```bash -podman run -d --name qenvs-rhel \ +podman run -d --name mapt-rhel \ -v ${PWD}:/workspace:z \ -e AWS_ACCESS_KEY_ID=XXX \ -e AWS_SECRET_ACCESS_KEY=XXX \ -e AWS_DEFAULT_REGION=us-east-1 \ - quay.io/rhqp/qenvs:0.0.6-dev aws mac create \ - --project-name qenvs-mac \ + quay.io/redhat-developer/mapt:0.7.0-dev aws mac create \ + --project-name mapt-mac \ --backed-url file:///workspace \ --conn-details-output /workspace ``` \ No newline at end of file diff --git a/docs/aws/mac.svg b/docs/aws/mac.svg index 38dde880..a1a65ec2 100644 --- a/docs/aws/mac.svg +++ b/docs/aws/mac.svg @@ -1,4 +1,4 @@ -
qenvs
qenvs
aws mac request 
aws mac request 
Region
Region
Availability Zone
Availability Zone
Create will check if dedicated host exists on the pool and if it not locked. If no locked will create a machine and locked it. Otherwise it will return error
Create will check if dedicated host exis...
Region
Region
Availability Zone
Availability Zone
VPC
VPC
Public subnet
Public subnet
Create a mac machine with an OS version (default 14) it has internet connectivity. It creates all infra around it (networking, security groups, keys...)
Create a mac machine with an OS version...
Scenario 1
Scenario 1
Scenario 2 (airgap)
Scenario 2 (airgap)
Region
Region
Availability Zone
Availability Zone
VPC
VPC
Airgap subnet
Airgap subnet
Public subnet
Public subnet
bastion
bastion
Create a mac machine with an OS version (default 14). Mac machine is sitting on an airgap network, although it is able to run an init phase (bootstrap) with connectivity. Once the creation is finished it can only be accessed through the bastion and it will not have external connectivity .It creates all infra around it (networking, security groups, keys, bastion...)
Create a mac machine with an OS version (default 14). Mac machine is sitting on...
qenvs
qenvs
aws mac destroy 
aws mac destroy 
After 24 hours the dedicated host can be destroyed. If mac machine exists and it is not locked it will remove all assets related to it. If no mac machine exists it will remove the dedicated host
After 24 hours the dedicated host can...
qenvs
qenvs
aws mac release
aws mac release
Release operation will remove the lock the machine identified , as new requests can make use of it
Release operation will remove the lock t...
Text is not SVG - cannot display
\ No newline at end of file +
mapt
mapt
aws mac request 
aws mac request 
Region
Region
Availability Zone
Availability Zone
Create will check if dedicated host exists on the pool and if it not locked. If no locked will create a machine and locked it. Otherwise it will return error
Create will check if dedicated host exis...
Region
Region
Availability Zone
Availability Zone
VPC
VPC
Public subnet
Public subnet
Create a mac machine with an OS version (default 14) it has internet connectivity. It creates all infra around it (networking, security groups, keys...)
Create a mac machine with an OS version...
Scenario 1
Scenario 1
Scenario 2 (airgap)
Scenario 2 (airgap)
Region
Region
Availability Zone
Availability Zone
VPC
VPC
Airgap subnet
Airgap subnet
Public subnet
Public subnet
bastion
bastion
Create a mac machine with an OS version (default 14). Mac machine is sitting on an airgap network, although it is able to run an init phase (bootstrap) with connectivity. Once the creation is finished it can only be accessed through the bastion and it will not have external connectivity .It creates all infra around it (networking, security groups, keys, bastion...)
Create a mac machine with an OS version (default 14). Mac machine is sitting on...
mapt
mapt
aws mac destroy 
aws mac destroy 
After 24 hours the dedicated host can be destroyed. If mac machine exists and it is not locked it will remove all assets related to it. If no mac machine exists it will remove the dedicated host
After 24 hours the dedicated host can...
mapt
mapt
aws mac release
aws mac release
Release operation will remove the lock the machine identified , as new requests can make use of it
Release operation will remove the lock t...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/aws/rhel.md b/docs/aws/rhel.md index ef6ff0d0..517ae516 100644 --- a/docs/aws/rhel.md +++ b/docs/aws/rhel.md @@ -8,11 +8,11 @@ As a special case it offers the `profileSNC` option if that flag is set the inst ## Create ```bash -qenvs aws rhel create -h +mapt aws rhel create -h create Usage: - qenvs aws rhel create [flags] + mapt aws rhel create [flags] Flags: --airgap if this flag is set the host will be created as airgap machine. Access will done through a bastion @@ -48,13 +48,13 @@ Global Flags: When running the container image it is required to pass the authetication information as variables(to setup AWS credentials there is a [helper script](./../../hacks/aws_setup.sh)), following a sample snipped on how to create an instance with default values: ```bash -podman run -d --name qenvs-rhel \ +podman run -d --name mapt-rhel \ -v ${PWD}:/workspace:z \ -e AWS_ACCESS_KEY_ID=XXX \ -e AWS_SECRET_ACCESS_KEY=XXX \ -e AWS_DEFAULT_REGION=us-east-1 \ - quay.io/rhqp/qenvs:0.6.0 aws rhel create \ - --project-name qenvs-rhel \ + quay.io/redhat-developer/mapt:0.7.0-dev aws rhel create \ + --project-name mapt-rhel \ --backed-url file:///workspace \ --rh-subscription-password XXXX \ --rh-subscription-username XXXXX \ diff --git a/docs/aws/windows.md b/docs/aws/windows.md index 98f8346d..8e34c6ea 100644 --- a/docs/aws/windows.md +++ b/docs/aws/windows.md @@ -2,7 +2,7 @@ This actions will handle provision Windows Server machines on dedicated hosts. This is a requisite to run nested virtualization on AWS. -Due to how qenvs checks the healthy state for the machine and due to some specific characteristics this action is intended for using within a [custom ami](https://github.com/adrianriobo/qenvs-builder). +Due to how mapt checks the healthy state for the machine and due to some specific characteristics this action is intended for using within a [custom ami](https://github.com/redhat-developer/mapt-builder). Some of the customizations this image includes: @@ -15,7 +15,7 @@ Some of the customizations this image includes: ## Ami replication -Also the action is expecting the image exists with the name: `Windows_Server-2022-English-Full-HyperV-RHQE` at least on one region (this AMI can be created using the helper side project [qenvs-builder](https://github.com/adrianriobo/qenvs-builder)). If `--spot` option is enable and the image is not offered / created on the chosen region it will copy the AMI as part of the stack (As so it will delete it on destroy). +Also the action is expecting the image exists with the name: `Windows_Server-2022-English-Full-HyperV-RHQE` at least on one region (this AMI can be created using the helper side project [mapt-builder](https://github.com/redhat-developer/mapt-builder)). If `--spot` option is enable and the image is not offered / created on the chosen region it will copy the AMI as part of the stack (As so it will delete it on destroy). This process (replicate the ami) increase the overall time for spinning the machine, and can be avoided by running the replication cmd on the image to pre replicate the image on all regions. @@ -26,11 +26,11 @@ Disclaimer in case of use the `--ami-keep-copy` it will keep the ami and the six ## Create ```bash -qenvs aws windows create -h +mapt aws windows create -h create Usage: - qenvs aws windows create [flags] + mapt aws windows create [flags] Flags: --airgap if this flag is set the host will be created as airgap machine. Access will done through a bastion @@ -67,13 +67,13 @@ Global Flags: When running the container image it is required to pass the authetication information as variables(to setup AWS credentials there is a [helper script](./../../hacks/aws_setup.sh)), following a sample snipped on how to create an instance with default values: ```bash -podman run -d --name qenvs-rhel \ +podman run -d --name mapt-rhel \ -v ${PWD}:/workspace:z \ -e AWS_ACCESS_KEY_ID=XXX \ -e AWS_SECRET_ACCESS_KEY=XXX \ -e AWS_DEFAULT_REGION=us-east-1 \ - quay.io/rhqp/qenvs:0.0.6-dev aws windows create \ - --project-name qenvs-windows \ + quay.io/redhat-developer/mapt:0.7.0-dev aws windows create \ + --project-name mapt-windows \ --backed-url file:///workspace \ --conn-details-output /workspace ``` \ No newline at end of file diff --git a/docs/azure.md b/docs/azure.md index 914a40a5..648b2d54 100644 --- a/docs/azure.md +++ b/docs/azure.md @@ -1,6 +1,6 @@ # Overview -qenvs offers several operations to manage environments within azure: +mapt offers several operations to manage environments within azure: ## Windows @@ -30,11 +30,11 @@ Side note: the other requirements for reboot are done by default; hyper-v instal This will create a windows desktop accordig to params specificed: ```bash -podman run -it --rm quay.io/rhqp/qenvs:v0.7.0 azure windows create -h +podman run -it --rm quay.io/redhat-developer/mapt:0.7.0-dev azure windows create -h create Usage: - qenvs azure windows create [flags] + mapt azure windows create [flags] Flags: --admin-username string username for admin user. Only rdp accessible within generated password (default "rhqpadmin") @@ -76,7 +76,7 @@ podman run -d --rm \ -e ARM_SUBSCRIPTION_ID=${asi_value} \ -e ARM_CLIENT_ID=${aci_value} \ -e ARM_CLIENT_SECRET=${acs_lue} \ - quay.io/rhqp/qenvs:v0.0.5 azure \ + quay.io/redhat-developer/mapt:0.7.0-dev azure \ windows create \ --project-name "win-desk-11" \ --backed-url "file:///workspace" \ @@ -94,7 +94,7 @@ podman run -d --rm \ -e ARM_SUBSCRIPTION_ID=${asi_value} \ -e ARM_CLIENT_ID=${aci_value} \ -e ARM_CLIENT_SECRET=${acs_lue} \ - quay.io/rhqp/qenvs:v0.0.5 azure \ + quay.io/redhat-developer/mapt:0.7.0-dev azure \ windows destroy \ --project-name "win-desk-11" \ --backed-url "file:///workspace" diff --git a/go.mod b/go.mod index 5c02633e..d650220d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/adrianriobo/qenvs +module github.com/redhat-developer/mapt go 1.21 diff --git a/hacks/azure/azure_setup.sh b/hacks/azure/azure_setup.sh index 3a306945..49b832f7 100644 --- a/hacks/azure/azure_setup.sh +++ b/hacks/azure/azure_setup.sh @@ -18,22 +18,22 @@ az ad sp create-for-rbac --name ${name} \ # Create rg for blob container for pulumi state az group create \ - --name crc-qenvs \ + --name crc-mapt \ --location westeurope az storage account create \ - --name crcqenvs \ - --resource-group crc-qenvs \ + --name crcmapt \ + --resource-group crc-mapt \ --location westeurope \ --sku Standard_ZRS \ --encryption-services blob \ --allow-blob-public-access false az storage container create \ - --account-name crcqenvs \ - --name crc-qenvs-state \ + --account-name crcmapt \ + --name crc-mapt-state \ --auth-mode login # Get az storage account key to set on AZURE_STORAGE_KEY # https://www.pulumi.com/docs/concepts/state/#azure-blob-storage -az storage account keys list --account-name crcqenvs \ No newline at end of file +az storage account keys list --account-name crcmapt \ No newline at end of file diff --git a/oci/Containerfile b/oci/Containerfile index 7df25476..da153474 100644 --- a/oci/Containerfile +++ b/oci/Containerfile @@ -17,9 +17,9 @@ FROM registry.access.redhat.com/ubi9/ubi LABEL org.opencontainers.image.authors="Adrian Riobo" -COPY --from=builder /workspace/out/qenvs /workspace/pulumi/pulumi /usr/local/bin/ +COPY --from=builder /workspace/out/mapt /workspace/pulumi/pulumi /usr/local/bin/ -ENV INTERNAL_OUTPUT=/tmp/qenvs \ +ENV INTERNAL_OUTPUT=/tmp/mapt \ PULUMI_CONFIG_PASSPHRASE="passphrase" \ AWS_SDK_LOAD_CONFIG=1 @@ -65,7 +65,7 @@ RUN curl ${AWS_CLI_URL} -o awscliv2.zip \ # TODO review permissions on sharing mounting volume from host # USER 65532:65532 -ENTRYPOINT ["qenvs"] +ENTRYPOINT ["mapt"] # Default to show help CMD ["-h"] diff --git a/pkg/manager/context/context.go b/pkg/manager/context/context.go index 41aea0c7..ce7a85a3 100644 --- a/pkg/manager/context/context.go +++ b/pkg/manager/context/context.go @@ -3,16 +3,16 @@ package context import ( "fmt" - "github.com/adrianriobo/qenvs/pkg/util" - "github.com/adrianriobo/qenvs/pkg/util/logging" - utilMaps "github.com/adrianriobo/qenvs/pkg/util/maps" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/logging" + utilMaps "github.com/redhat-developer/mapt/pkg/util/maps" "golang.org/x/exp/maps" ) const ( tagKeyOrigin = "origin" - origin = "qenvs" + origin = "mapt" TagKeyProjectName = "projectName" TagKeyRunID = "runid" ) diff --git a/pkg/manager/manager.go b/pkg/manager/manager.go index 31f8c607..c7b55540 100644 --- a/pkg/manager/manager.go +++ b/pkg/manager/manager.go @@ -4,13 +4,13 @@ import ( "context" "os" - "github.com/adrianriobo/qenvs/pkg/manager/credentials" - "github.com/adrianriobo/qenvs/pkg/util/logging" "github.com/pulumi/pulumi/sdk/v3/go/auto" "github.com/pulumi/pulumi/sdk/v3/go/auto/debug" "github.com/pulumi/pulumi/sdk/v3/go/auto/optdestroy" "github.com/pulumi/pulumi/sdk/v3/go/auto/optup" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager/credentials" + "github.com/redhat-developer/mapt/pkg/util/logging" ) type Stack struct { diff --git a/pkg/manager/util.go b/pkg/manager/util.go index ead1d648..c8c1e35f 100644 --- a/pkg/manager/util.go +++ b/pkg/manager/util.go @@ -5,11 +5,11 @@ import ( "os" "path/filepath" - "github.com/adrianriobo/qenvs/pkg/manager/credentials" - "github.com/adrianriobo/qenvs/pkg/util/logging" "github.com/pulumi/pulumi/sdk/v3/go/auto" "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" "github.com/pulumi/pulumi/sdk/v3/go/common/workspace" + "github.com/redhat-developer/mapt/pkg/manager/credentials" + "github.com/redhat-developer/mapt/pkg/util/logging" ) // this function gets our stack ready for update/destroy by prepping the workspace, init/selecting the stack diff --git a/pkg/provider/aws/action/fedora/fedora.go b/pkg/provider/aws/action/fedora/fedora.go index a0d6ccf8..d29c2ea5 100644 --- a/pkg/provider/aws/action/fedora/fedora.go +++ b/pkg/provider/aws/action/fedora/fedora.go @@ -4,25 +4,25 @@ import ( "fmt" "os" - "github.com/adrianriobo/qenvs/pkg/manager" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - infra "github.com/adrianriobo/qenvs/pkg/provider" - "github.com/adrianriobo/qenvs/pkg/provider/aws" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/bastion" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/ec2/compute" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/network" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/spot" - amiSVC "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/ami" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/keypair" - securityGroup "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/security-group" - "github.com/adrianriobo/qenvs/pkg/provider/util/command" - "github.com/adrianriobo/qenvs/pkg/provider/util/output" - "github.com/adrianriobo/qenvs/pkg/util" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/auto" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + infra "github.com/redhat-developer/mapt/pkg/provider" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/bastion" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/ec2/compute" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/spot" + amiSVC "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/ami" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/keypair" + securityGroup "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/security-group" + "github.com/redhat-developer/mapt/pkg/provider/util/command" + "github.com/redhat-developer/mapt/pkg/provider/util/output" + "github.com/redhat-developer/mapt/pkg/util" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" ) type Request struct { @@ -93,9 +93,9 @@ func Destroy() (err error) { func (r *Request) createMachine() error { cs := manager.Stack{ - StackName: qenvsContext.StackNameByProject(stackName), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL(), + StackName: maptContext.StackNameByProject(stackName), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL(), ProviderCredentials: aws.GetClouProviderCredentials( map[string]string{ aws.CONFIG_AWS_REGION: r.region}), @@ -199,12 +199,12 @@ func (r *Request) manageResults(stackResult auto.UpResult) error { fmt.Sprintf("%s-%s", r.Prefix, outputHost): "host", } if r.Airgap { - err := bastion.WriteOutputs(stackResult, r.Prefix, qenvsContext.GetResultsOutputPath()) + err := bastion.WriteOutputs(stackResult, r.Prefix, maptContext.GetResultsOutputPath()) if err != nil { return err } } - return output.Write(stackResult, qenvsContext.GetResultsOutputPath(), results) + return output.Write(stackResult, maptContext.GetResultsOutputPath(), results) } // security group for mac machine with ingress rules for ssh and vnc diff --git a/pkg/provider/aws/action/mac/mac-dh.go b/pkg/provider/aws/action/mac/mac-dh.go index 29238da0..51576d1c 100644 --- a/pkg/provider/aws/action/mac/mac-dh.go +++ b/pkg/provider/aws/action/mac/mac-dh.go @@ -3,16 +3,16 @@ package mac import ( "fmt" - "github.com/adrianriobo/qenvs/pkg/manager" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - "github.com/adrianriobo/qenvs/pkg/provider/util/output" - "github.com/adrianriobo/qenvs/pkg/util/logging" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/auto" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/provider/util/output" + "github.com/redhat-developer/mapt/pkg/util/logging" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" ) // Idea move away from multi file creation a set outputs as an unified yaml file @@ -38,8 +38,8 @@ func (r *MacRequest) createDedicatedHost() (dhi *HostInformation, err error) { logging.Debugf("creating a mac %s dedicated host state will be stored at %s", r.Architecture, backedURL) cs := manager.Stack{ - StackName: qenvsContext.StackNameByProject(stackDedicatedHost), - ProjectName: qenvsContext.ProjectName(), + StackName: maptContext.StackNameByProject(stackDedicatedHost), + ProjectName: maptContext.ProjectName(), BackedURL: backedURL, ProviderCredentials: aws.GetClouProviderCredentials( map[string]string{ @@ -71,11 +71,11 @@ func (r *MacRequest) deployerDedicatedHost(ctx *pulumi.Context) (err error) { AutoPlacement: pulumi.String("off"), AvailabilityZone: pulumi.String(*r.AvailabilityZone), InstanceType: pulumi.String(macTypesByArch[r.Architecture]), - Tags: qenvsContext.ResourceTagsWithCustom( + Tags: maptContext.ResourceTagsWithCustom( map[string]string{ - tagKeyBackedURL: backedURL, - tagKeyArch: r.Architecture, - qenvsContext.TagKeyRunID: qenvsContext.RunID(), + tagKeyBackedURL: backedURL, + tagKeyArch: r.Architecture, + maptContext.TagKeyRunID: maptContext.RunID(), }), }) ctx.Export(fmt.Sprintf("%s-%s", r.Prefix, outputDedicatedHostID), dh.ID()) @@ -89,7 +89,7 @@ func (r *MacRequest) deployerDedicatedHost(ctx *pulumi.Context) (err error) { // results for dedicated host it will return dedicatedhost ID and dedicatedhost AZ // also write results to files on the target folder func (r *MacRequest) manageResultsDedicatedHost(stackResult auto.UpResult) (*string, *string, error) { - if err := output.Write(stackResult, qenvsContext.GetResultsOutputPath(), map[string]string{ + if err := output.Write(stackResult, maptContext.GetResultsOutputPath(), map[string]string{ fmt.Sprintf("%s-%s", r.Prefix, outputDedicatedHostID): "dedicated_host_id", }); err != nil { return nil, nil, err diff --git a/pkg/provider/aws/action/mac/mac-machine.go b/pkg/provider/aws/action/mac/mac-machine.go index e4d407a6..354b4aef 100644 --- a/pkg/provider/aws/action/mac/mac-machine.go +++ b/pkg/provider/aws/action/mac/mac-machine.go @@ -4,23 +4,23 @@ import ( _ "embed" "fmt" - "github.com/adrianriobo/qenvs/pkg/manager" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - infra "github.com/adrianriobo/qenvs/pkg/provider" - "github.com/adrianriobo/qenvs/pkg/provider/aws" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/bastion" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/network" - qEC2 "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/compute" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/keypair" - securityGroup "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/security-group" - "github.com/adrianriobo/qenvs/pkg/provider/util/command" - "github.com/adrianriobo/qenvs/pkg/provider/util/output" - "github.com/adrianriobo/qenvs/pkg/provider/util/security" - "github.com/adrianriobo/qenvs/pkg/util" - "github.com/adrianriobo/qenvs/pkg/util/file" - "github.com/adrianriobo/qenvs/pkg/util/logging" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + infra "github.com/redhat-developer/mapt/pkg/provider" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/bastion" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network" + qEC2 "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/compute" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/keypair" + securityGroup "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/security-group" + "github.com/redhat-developer/mapt/pkg/provider/util/command" + "github.com/redhat-developer/mapt/pkg/provider/util/output" + "github.com/redhat-developer/mapt/pkg/provider/util/security" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/file" + "github.com/redhat-developer/mapt/pkg/util/logging" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-command/sdk/go/command/remote" @@ -47,8 +47,8 @@ type locked struct { func isMachineLocked(prefix string, h *HostInformation) (bool, error) { s, err := manager.CheckStack(manager.Stack{ - StackName: qenvsContext.StackNameByProject(stackMacMachine), - ProjectName: qenvsContext.ProjectName(), + StackName: maptContext.StackNameByProject(stackMacMachine), + ProjectName: maptContext.ProjectName(), BackedURL: *h.BackedURL, ProviderCredentials: aws.GetClouProviderCredentials( map[string]string{ @@ -104,8 +104,8 @@ func (r *MacRequest) replaceMachine(h *HostInformation) error { func (r *MacRequest) releaseLock(h *HostInformation) error { r.lock = false lockURN := fmt.Sprintf("urn:pulumi:%s::%s::%s::%s", - qenvsContext.StackNameByProject(stackMacMachine), - qenvsContext.ProjectName(), + maptContext.StackNameByProject(stackMacMachine), + maptContext.ProjectName(), customResourceTypeLock, resourcesUtil.GetResourceName( r.Prefix, awsMacMachineID, "mac-lock")) @@ -254,12 +254,12 @@ func (r *MacRequest) manageResultsMachine(stackResult auto.UpResult) error { fmt.Sprintf("%s-%s", r.Prefix, outputDedicatedHostID): "dedicated_host_id", } if r.Airgap { - err := bastion.WriteOutputs(stackResult, r.Prefix, qenvsContext.GetResultsOutputPath()) + err := bastion.WriteOutputs(stackResult, r.Prefix, maptContext.GetResultsOutputPath()) if err != nil { return err } } - return output.Write(stackResult, qenvsContext.GetResultsOutputPath(), results) + return output.Write(stackResult, maptContext.GetResultsOutputPath(), results) } // security group for mac machine with ingress rules for ssh and vnc @@ -313,7 +313,7 @@ func (r *MacRequest) instance(ctx *pulumi.Context, RootBlockDevice: ec2.InstanceRootBlockDeviceArgs{ VolumeSize: pulumi.Int(diskSize), }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), } if r.Airgap { instanceArgs.AssociatePublicIpAddress = pulumi.Bool(false) @@ -364,7 +364,7 @@ func (r *MacRequest) getBootstrapScript(ctx *pulumi.Context) ( error) { name := *r.dedicatedHost.RunID if r.replace { - name = qenvsContext.CreateRunID() + name = maptContext.CreateRunID() } password, err := security.CreatePassword(ctx, name) diff --git a/pkg/provider/aws/action/mac/mac.go b/pkg/provider/aws/action/mac/mac.go index f07aff8d..b4248f0d 100644 --- a/pkg/provider/aws/action/mac/mac.go +++ b/pkg/provider/aws/action/mac/mac.go @@ -5,11 +5,11 @@ import ( "fmt" "strings" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/tag" - "github.com/adrianriobo/qenvs/pkg/util/logging" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/tag" + "github.com/redhat-developer/mapt/pkg/util/logging" ec2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" ) @@ -55,8 +55,8 @@ func Request(r *MacRequest) error { return err } // We update the runID on the dedicated host - return tag.Update(qenvsContext.TagKeyRunID, - qenvsContext.RunID(), + return tag.Update(maptContext.TagKeyRunID, + maptContext.RunID(), *hi.Region, *hi.Host.HostId) } @@ -75,7 +75,7 @@ func Release(prefix string, hostID string) error { } hi := getHostInformation(*host) // Set context based on info from dedicated host to be released - qenvsContext.InitBase( + maptContext.InitBase( *hi.ProjectName, *hi.BackedURL) // Set a default request @@ -97,7 +97,7 @@ func Destroy(prefix, hostID string) error { } hi := getHostInformation(*host) // Set context based on info from dedicated host to be released - qenvsContext.InitBase( + maptContext.InitBase( *hi.ProjectName, *hi.BackedURL) // Check if dh is available and it has no instance on it @@ -133,8 +133,8 @@ func Destroy(prefix, hostID string) error { // // * backedURL will be used to create the mac machine stack // * arch will be used to match new requests for specific arch -// * origin fixed qenvs value -// * instaceTagName id for the qenvs execution +// * origin fixed mapt value +// * instaceTagName id for the mapt execution // * (customs) any tag passed as --tags param on the create operation // // It will also create a mac machine based on the arch and version setup diff --git a/pkg/provider/aws/action/mac/types.go b/pkg/provider/aws/action/mac/types.go index 41353455..65884342 100644 --- a/pkg/provider/aws/action/mac/types.go +++ b/pkg/provider/aws/action/mac/types.go @@ -1,8 +1,8 @@ package mac import ( - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/network" ec2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network" ) type MacRequest struct { diff --git a/pkg/provider/aws/action/mac/util.go b/pkg/provider/aws/action/mac/util.go index bcd3d594..416e4e5e 100644 --- a/pkg/provider/aws/action/mac/util.go +++ b/pkg/provider/aws/action/mac/util.go @@ -5,10 +5,10 @@ import ( "os" "strings" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - "github.com/adrianriobo/qenvs/pkg/util/logging" ec2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/util/logging" "golang.org/x/exp/slices" ) @@ -20,8 +20,8 @@ func getHostInformation(h ec2Types.Host) *HostInformation { return &HostInformation{ Arch: &archValue, BackedURL: getTagValue(h.Tags, tagKeyBackedURL), - ProjectName: getTagValue(h.Tags, qenvsContext.TagKeyProjectName), - RunID: getTagValue(h.Tags, qenvsContext.TagKeyRunID), + ProjectName: getTagValue(h.Tags, maptContext.TagKeyProjectName), + RunID: getTagValue(h.Tags, maptContext.TagKeyRunID), Region: ®ion, Host: &h, } @@ -38,10 +38,10 @@ func getTagValue(tags []ec2Types.Tag, tagKey string) *string { // format for remote backed url when creating the dedicated host // the backed url from param is used as base and the ID is appended as sub path func getBackedURL() string { - if strings.Contains(qenvsContext.BackedURL(), "file://") { - return qenvsContext.BackedURL() + if strings.Contains(maptContext.BackedURL(), "file://") { + return maptContext.BackedURL() } - return fmt.Sprintf("%s/%s", qenvsContext.BackedURL(), qenvsContext.RunID()) + return fmt.Sprintf("%s/%s", maptContext.BackedURL(), maptContext.RunID()) } // Get all dedicated hosts matching the tags + arch @@ -59,7 +59,7 @@ func getMatchingHostsInformation(arch string) ([]*HostInformation, error) { // Get all dedicated hosts by tag and state func getMatchingHostsInStateInformation(arch string, state *ec2Types.AllocationState) ([]*HostInformation, error) { - matchingTags := qenvsContext.GetTags() + matchingTags := maptContext.GetTags() matchingTags[tagKeyArch] = arch hosts, err := data.GetDedicatedHosts(data.DedicatedHostResquest{ Tags: matchingTags, diff --git a/pkg/provider/aws/action/rhel/rhel.go b/pkg/provider/aws/action/rhel/rhel.go index 4d9a8018..92c7f46a 100644 --- a/pkg/provider/aws/action/rhel/rhel.go +++ b/pkg/provider/aws/action/rhel/rhel.go @@ -6,26 +6,26 @@ import ( "fmt" "os" - "github.com/adrianriobo/qenvs/pkg/manager" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - infra "github.com/adrianriobo/qenvs/pkg/provider" - "github.com/adrianriobo/qenvs/pkg/provider/aws" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/bastion" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/ec2/compute" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/network" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/spot" - amiSVC "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/ami" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/keypair" - securityGroup "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/security-group" - "github.com/adrianriobo/qenvs/pkg/provider/util/command" - "github.com/adrianriobo/qenvs/pkg/provider/util/output" - "github.com/adrianriobo/qenvs/pkg/util" - "github.com/adrianriobo/qenvs/pkg/util/file" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/auto" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + infra "github.com/redhat-developer/mapt/pkg/provider" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/bastion" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/ec2/compute" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/spot" + amiSVC "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/ami" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/keypair" + securityGroup "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/security-group" + "github.com/redhat-developer/mapt/pkg/provider/util/command" + "github.com/redhat-developer/mapt/pkg/provider/util/output" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/file" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" ) type Request struct { @@ -113,9 +113,9 @@ func Destroy() error { func (r *Request) createMachine() error { cs := manager.Stack{ - StackName: qenvsContext.StackNameByProject(stackName), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL(), + StackName: maptContext.StackNameByProject(stackName), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL(), ProviderCredentials: aws.GetClouProviderCredentials( map[string]string{ aws.CONFIG_AWS_REGION: r.region}), @@ -225,12 +225,12 @@ func (r *Request) manageResults(stackResult auto.UpResult) error { fmt.Sprintf("%s-%s", r.Prefix, outputHost): "host", } if r.Airgap { - err := bastion.WriteOutputs(stackResult, r.Prefix, qenvsContext.GetResultsOutputPath()) + err := bastion.WriteOutputs(stackResult, r.Prefix, maptContext.GetResultsOutputPath()) if err != nil { return err } } - return output.Write(stackResult, qenvsContext.GetResultsOutputPath(), results) + return output.Write(stackResult, maptContext.GetResultsOutputPath(), results) } // security group for mac machine with ingress rules for ssh and vnc diff --git a/pkg/provider/aws/action/windows/windows.go b/pkg/provider/aws/action/windows/windows.go index 0b491a67..7f9b05f3 100644 --- a/pkg/provider/aws/action/windows/windows.go +++ b/pkg/provider/aws/action/windows/windows.go @@ -6,29 +6,29 @@ import ( "fmt" "os" - "github.com/adrianriobo/qenvs/pkg/manager" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - infra "github.com/adrianriobo/qenvs/pkg/provider" - "github.com/adrianriobo/qenvs/pkg/provider/aws" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - amiCopy "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/ami" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/bastion" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/ec2/compute" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/network" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/spot" - amiSVC "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/ami" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/keypair" - securityGroup "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/security-group" - "github.com/adrianriobo/qenvs/pkg/provider/util/command" - "github.com/adrianriobo/qenvs/pkg/provider/util/output" - "github.com/adrianriobo/qenvs/pkg/provider/util/security" - "github.com/adrianriobo/qenvs/pkg/util" - "github.com/adrianriobo/qenvs/pkg/util/file" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-random/sdk/v4/go/random" "github.com/pulumi/pulumi/sdk/v3/go/auto" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + infra "github.com/redhat-developer/mapt/pkg/provider" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + amiCopy "github.com/redhat-developer/mapt/pkg/provider/aws/modules/ami" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/bastion" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/ec2/compute" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/spot" + amiSVC "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/ami" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/keypair" + securityGroup "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/security-group" + "github.com/redhat-developer/mapt/pkg/provider/util/command" + "github.com/redhat-developer/mapt/pkg/provider/util/output" + "github.com/redhat-developer/mapt/pkg/provider/util/security" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/file" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" ) // add proxy https://github.com/ptcodes/proxy-server-with-terraform/blob/master/main.tf @@ -153,9 +153,9 @@ func Destroy() (err error) { func (r *Request) createMachine() error { cs := manager.Stack{ - StackName: qenvsContext.StackNameByProject(stackName), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL(), + StackName: maptContext.StackNameByProject(stackName), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL(), ProviderCredentials: aws.GetClouProviderCredentials( map[string]string{ aws.CONFIG_AWS_REGION: r.region}), @@ -269,12 +269,12 @@ func (r *Request) manageResults(stackResult auto.UpResult) error { fmt.Sprintf("%s-%s", r.Prefix, outputHost): "host", } if r.Airgap { - err := bastion.WriteOutputs(stackResult, r.Prefix, qenvsContext.GetResultsOutputPath()) + err := bastion.WriteOutputs(stackResult, r.Prefix, maptContext.GetResultsOutputPath()) if err != nil { return err } } - return output.Write(stackResult, qenvsContext.GetResultsOutputPath(), results) + return output.Write(stackResult, maptContext.GetResultsOutputPath(), results) } // security group for mac machine with ingress rules for ssh and vnc diff --git a/pkg/provider/aws/aws.go b/pkg/provider/aws/aws.go index a029cb1b..de40a94e 100644 --- a/pkg/provider/aws/aws.go +++ b/pkg/provider/aws/aws.go @@ -5,15 +5,15 @@ import ( "fmt" "os" - "github.com/adrianriobo/qenvs/pkg/manager" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/manager/credentials" - "github.com/adrianriobo/qenvs/pkg/util" - "github.com/adrianriobo/qenvs/pkg/util/logging" - "github.com/adrianriobo/qenvs/pkg/util/maps" "github.com/aws/aws-sdk-go-v2/aws" awsEC2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" "github.com/pulumi/pulumi/sdk/v3/go/auto" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/manager/credentials" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/logging" + "github.com/redhat-developer/mapt/pkg/util/maps" ) const ( @@ -66,11 +66,11 @@ func DestroyStack(s DestroyStackRequest) error { return fmt.Errorf("stackname is required") } return manager.DestroyStack(manager.Stack{ - StackName: qenvsContext.StackNameByProject(s.Stackname), - ProjectName: qenvsContext.ProjectName(), + StackName: maptContext.StackNameByProject(s.Stackname), + ProjectName: maptContext.ProjectName(), BackedURL: util.If(len(s.BackedURL) > 0, s.BackedURL, - qenvsContext.BackedURL()), + maptContext.BackedURL()), ProviderCredentials: GetClouProviderCredentials( map[string]string{ CONFIG_AWS_REGION: util.If(len(s.Region) > 0, @@ -78,9 +78,9 @@ func DestroyStack(s DestroyStackRequest) error { os.Getenv("AWS_DEFAULT_REGION"))})}) } -// Create a list of filters for tags based on the tags added by qenvs +// Create a list of filters for tags based on the tags added by mapt func GetTagsAsFilters() (filters []*awsEC2Types.Filter) { - filterMap := maps.Convert(qenvsContext.GetTags(), + filterMap := maps.Convert(maptContext.GetTags(), func(name string) *string { return aws.String("tag:" + name) }, func(value string) []string { return []string{value} }) for k, v := range filterMap { diff --git a/pkg/provider/aws/data/ami.go b/pkg/provider/aws/data/ami.go index 71a87a5d..72cea660 100644 --- a/pkg/provider/aws/data/ami.go +++ b/pkg/provider/aws/data/ami.go @@ -8,10 +8,10 @@ import ( "golang.org/x/exp/slices" - "github.com/adrianriobo/qenvs/pkg/util/logging" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/ec2" ec2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/redhat-developer/mapt/pkg/util/logging" ) type ImageInfo struct { diff --git a/pkg/provider/aws/data/azs.go b/pkg/provider/aws/data/azs.go index 278078a3..488dd598 100644 --- a/pkg/provider/aws/data/azs.go +++ b/pkg/provider/aws/data/azs.go @@ -4,12 +4,12 @@ import ( "context" "fmt" - "github.com/adrianriobo/qenvs/pkg/util" - "github.com/adrianriobo/qenvs/pkg/util/logging" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/ec2" ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/logging" "golang.org/x/exp/slices" ) diff --git a/pkg/provider/aws/data/dedicatedhost.go b/pkg/provider/aws/data/dedicatedhost.go index 637b81f5..0effe8bb 100644 --- a/pkg/provider/aws/data/dedicatedhost.go +++ b/pkg/provider/aws/data/dedicatedhost.go @@ -5,8 +5,8 @@ import ( "fmt" "sync" - "github.com/adrianriobo/qenvs/pkg/util" "github.com/aws/aws-sdk-go-v2/config" + "github.com/redhat-developer/mapt/pkg/util" "golang.org/x/exp/maps" "github.com/aws/aws-sdk-go-v2/service/ec2" diff --git a/pkg/provider/aws/data/instance.go b/pkg/provider/aws/data/instance.go index c1bb8a7b..ee11389d 100644 --- a/pkg/provider/aws/data/instance.go +++ b/pkg/provider/aws/data/instance.go @@ -4,10 +4,10 @@ import ( "context" "fmt" - "github.com/adrianriobo/qenvs/pkg/util" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/ec2" ec2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/redhat-developer/mapt/pkg/util" "golang.org/x/exp/maps" ) diff --git a/pkg/provider/aws/data/regions.go b/pkg/provider/aws/data/regions.go index e1ef34f0..0deebb3f 100644 --- a/pkg/provider/aws/data/regions.go +++ b/pkg/provider/aws/data/regions.go @@ -3,7 +3,7 @@ package data import ( "context" - "github.com/adrianriobo/qenvs/pkg/util" + "github.com/redhat-developer/mapt/pkg/util" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/ec2" diff --git a/pkg/provider/aws/modules/ami/ami.go b/pkg/provider/aws/modules/ami/ami.go index 550a5aed..b55998f3 100644 --- a/pkg/provider/aws/modules/ami/ami.go +++ b/pkg/provider/aws/modules/ami/ami.go @@ -4,12 +4,12 @@ import ( "fmt" "os" - "github.com/adrianriobo/qenvs/pkg/manager" - "github.com/adrianriobo/qenvs/pkg/provider/aws" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - "github.com/adrianriobo/qenvs/pkg/util/logging" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/util/logging" ) type ReplicatedRequest struct { diff --git a/pkg/provider/aws/modules/ami/stack.go b/pkg/provider/aws/modules/ami/stack.go index 43471703..3e8686cc 100644 --- a/pkg/provider/aws/modules/ami/stack.go +++ b/pkg/provider/aws/modules/ami/stack.go @@ -3,13 +3,13 @@ package ami import ( "fmt" - "github.com/adrianriobo/qenvs/pkg/manager" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - amiSVC "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/ami" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + amiSVC "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/ami" ) type CopyAMIRequest struct { @@ -38,9 +38,9 @@ type CopyAMIRequest struct { // If stack does not exists it will create it func (r CopyAMIRequest) Create() error { _, err := manager.CheckStack(manager.Stack{ - StackName: qenvsContext.StackNameByProject("copyAMI"), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL()}) + StackName: maptContext.StackNameByProject("copyAMI"), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL()}) if err != nil { return r.createStack() } @@ -50,18 +50,18 @@ func (r CopyAMIRequest) Create() error { // Check if spot option stack was created on the backed url func Exist() bool { s, err := manager.CheckStack(manager.Stack{ - StackName: qenvsContext.StackNameByProject("copyAMI"), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL()}) + StackName: maptContext.StackNameByProject("copyAMI"), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL()}) return err == nil && s != nil } // Destroy the stack func Destroy() (err error) { stack := manager.Stack{ - StackName: qenvsContext.StackNameByProject("copyAMI"), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL(), + StackName: maptContext.StackNameByProject("copyAMI"), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL(), ProviderCredentials: aws.DefaultCredentials} return manager.DestroyStack(stack) } @@ -75,9 +75,9 @@ func (r CopyAMIRequest) createStack() error { }) } stack := manager.Stack{ - StackName: qenvsContext.StackNameByProject("copyAMI"), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL(), + StackName: maptContext.StackNameByProject("copyAMI"), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL(), ProviderCredentials: credentials, DeployFunc: r.deployer, } @@ -103,7 +103,7 @@ func (r CopyAMIRequest) deployer(ctx *pulumi.Context) error { fmt.Sprintf("Replica of %s from %s", *amiInfo.Image.ImageId, *amiInfo.Region)), SourceAmiId: pulumi.String(*amiInfo.Image.ImageId), SourceAmiRegion: pulumi.String(*amiInfo.Region), - Tags: qenvsContext.ResourceTagsWithCustom( + Tags: maptContext.ResourceTagsWithCustom( map[string]string{"Name": *r.AMISourceName}), }, pulumi.RetainOnDelete(r.AMIKeepCopy)) diff --git a/pkg/provider/aws/modules/bastion/bastion.go b/pkg/provider/aws/modules/bastion/bastion.go index 3d0bbc4a..7402534a 100644 --- a/pkg/provider/aws/modules/bastion/bastion.go +++ b/pkg/provider/aws/modules/bastion/bastion.go @@ -3,18 +3,18 @@ package bastion import ( "fmt" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - infra "github.com/adrianriobo/qenvs/pkg/provider" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/ami" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/keypair" - securityGroup "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/security-group" - "github.com/adrianriobo/qenvs/pkg/provider/util/output" - "github.com/adrianriobo/qenvs/pkg/util" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-tls/sdk/v5/go/tls" "github.com/pulumi/pulumi/sdk/v3/go/auto" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + infra "github.com/redhat-developer/mapt/pkg/provider" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/ami" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/keypair" + securityGroup "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/security-group" + "github.com/redhat-developer/mapt/pkg/provider/util/output" + "github.com/redhat-developer/mapt/pkg/util" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" ) const ( @@ -126,7 +126,7 @@ func (r *BastionRequest) instance(ctx *pulumi.Context, RootBlockDevice: ec2.InstanceRootBlockDeviceArgs{ VolumeSize: pulumi.Int(diskSize), }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), } i, err := ec2.NewInstance(ctx, resourcesUtil.GetResourceName(r.Prefix, bastionMachineID, "instance"), diff --git a/pkg/provider/aws/modules/ec2/compute/compute.go b/pkg/provider/aws/modules/ec2/compute/compute.go index a1e81ebf..9007190a 100644 --- a/pkg/provider/aws/modules/ec2/compute/compute.go +++ b/pkg/provider/aws/modules/ec2/compute/compute.go @@ -4,18 +4,18 @@ import ( "fmt" "strconv" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/bastion" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/ec2/keypair" - "github.com/adrianriobo/qenvs/pkg/provider/util/command" - "github.com/adrianriobo/qenvs/pkg/util" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi-command/sdk/go/command/remote" "github.com/pulumi/pulumi-tls/sdk/v5/go/tls" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/bastion" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/ec2/keypair" + "github.com/redhat-developer/mapt/pkg/provider/util/command" + "github.com/redhat-developer/mapt/pkg/util" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" ) const ( @@ -84,7 +84,7 @@ func (r *ComputeRequest) onDemandInstance(ctx *pulumi.Context) (*ec2.Instance, e RootBlockDevice: ec2.InstanceRootBlockDeviceArgs{ VolumeSize: pulumi.Int(diskSize), }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), } if r.UserDataAsBase64 != nil { args.UserData = r.UserDataAsBase64 @@ -118,7 +118,7 @@ func (r ComputeRequest) spotInstance(ctx *pulumi.Context) (*autoscaling.Group, e }, }, }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), } if r.UserDataAsBase64 != nil { args.UserData = r.UserDataAsBase64 diff --git a/pkg/provider/aws/modules/network/airgap/airgap.go b/pkg/provider/aws/modules/network/airgap/airgap.go index 75ac2c9d..27c0229c 100644 --- a/pkg/provider/aws/modules/network/airgap/airgap.go +++ b/pkg/provider/aws/modules/network/airgap/airgap.go @@ -3,10 +3,10 @@ package airgap import ( "fmt" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/vpc/subnet" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/vpc/vpc" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/vpc/subnet" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/vpc/vpc" ) type AirgapNetworkRequest struct { diff --git a/pkg/provider/aws/modules/network/network.go b/pkg/provider/aws/modules/network/network.go index ef825365..a68b3d36 100644 --- a/pkg/provider/aws/modules/network/network.go +++ b/pkg/provider/aws/modules/network/network.go @@ -3,13 +3,13 @@ package network import ( "fmt" - "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/bastion" - na "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/network/airgap" - ns "github.com/adrianriobo/qenvs/pkg/provider/aws/modules/network/standard" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/provider/aws/modules/bastion" + na "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network/airgap" + ns "github.com/redhat-developer/mapt/pkg/provider/aws/modules/network/standard" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" ) const ( diff --git a/pkg/provider/aws/modules/network/standard/stack.go b/pkg/provider/aws/modules/network/standard/stack.go index 0114b248..31eacdd5 100644 --- a/pkg/provider/aws/modules/network/standard/stack.go +++ b/pkg/provider/aws/modules/network/standard/stack.go @@ -3,11 +3,11 @@ package standard import ( "fmt" - "github.com/adrianriobo/qenvs/pkg/manager" - "github.com/adrianriobo/qenvs/pkg/provider/aws" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + "github.com/redhat-developer/mapt/pkg/provider/aws" - "github.com/adrianriobo/qenvs/pkg/util/logging" + "github.com/redhat-developer/mapt/pkg/util/logging" ) func Create(projectName, backedURL, cidr string, diff --git a/pkg/provider/aws/modules/network/standard/standard.go b/pkg/provider/aws/modules/network/standard/standard.go index 9538c99d..3e754da8 100644 --- a/pkg/provider/aws/modules/network/standard/standard.go +++ b/pkg/provider/aws/modules/network/standard/standard.go @@ -3,11 +3,11 @@ package standard import ( "fmt" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/vpc/subnet" - "github.com/adrianriobo/qenvs/pkg/provider/aws/services/vpc/vpc" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/vpc/subnet" + "github.com/redhat-developer/mapt/pkg/provider/aws/services/vpc/vpc" ) const ( diff --git a/pkg/provider/aws/modules/spot/spot.go b/pkg/provider/aws/modules/spot/spot.go index 99e97ada..c3480046 100644 --- a/pkg/provider/aws/modules/spot/spot.go +++ b/pkg/provider/aws/modules/spot/spot.go @@ -6,13 +6,13 @@ import ( "strconv" "time" - "github.com/adrianriobo/qenvs/pkg/provider/aws/data" - "github.com/adrianriobo/qenvs/pkg/util" - "github.com/adrianriobo/qenvs/pkg/util/logging" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/ec2" ec2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/redhat-developer/mapt/pkg/provider/aws/data" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/logging" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "golang.org/x/exp/slices" diff --git a/pkg/provider/aws/modules/spot/stack.go b/pkg/provider/aws/modules/spot/stack.go index 7f944e48..5468e721 100644 --- a/pkg/provider/aws/modules/spot/stack.go +++ b/pkg/provider/aws/modules/spot/stack.go @@ -1,12 +1,12 @@ package spot import ( - "github.com/adrianriobo/qenvs/pkg/manager" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/aws" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" "github.com/pulumi/pulumi/sdk/v3/go/auto" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/aws" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" ) type SpotOptionRequest struct { @@ -35,9 +35,9 @@ type SpotOptionResult struct { // If stack does not exists it will create it func (r SpotOptionRequest) Create() (*SpotOptionResult, error) { stack, err := manager.CheckStack(manager.Stack{ - StackName: qenvsContext.StackNameByProject("spotOption"), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL()}) + StackName: maptContext.StackNameByProject("spotOption"), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL()}) if err != nil { return r.createStack() } else { @@ -48,18 +48,18 @@ func (r SpotOptionRequest) Create() (*SpotOptionResult, error) { // Check if spot option stack was created on the backed url func Exist() bool { s, err := manager.CheckStack(manager.Stack{ - StackName: qenvsContext.StackNameByProject("spotOption"), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL()}) + StackName: maptContext.StackNameByProject("spotOption"), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL()}) return err == nil && s != nil } // Destroy the stack func Destroy() (err error) { stack := manager.Stack{ - StackName: qenvsContext.StackNameByProject("spotOption"), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL(), + StackName: maptContext.StackNameByProject("spotOption"), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL(), ProviderCredentials: aws.DefaultCredentials} return manager.DestroyStack(stack) } @@ -67,9 +67,9 @@ func Destroy() (err error) { // function to create the stack func (r SpotOptionRequest) createStack() (*SpotOptionResult, error) { stack := manager.Stack{ - StackName: qenvsContext.StackNameByProject("spotOption"), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL(), + StackName: maptContext.StackNameByProject("spotOption"), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL(), ProviderCredentials: aws.DefaultCredentials, DeployFunc: r.deployer, } diff --git a/pkg/provider/aws/services/ec2/ami/ami.go b/pkg/provider/aws/services/ec2/ami/ami.go index e90c4b4b..e383ff30 100644 --- a/pkg/provider/aws/services/ec2/ami/ami.go +++ b/pkg/provider/aws/services/ec2/ami/ami.go @@ -6,12 +6,12 @@ import ( "golang.org/x/exp/slices" - "github.com/adrianriobo/qenvs/pkg/util/logging" "github.com/aws/aws-sdk-go-v2/config" awsEC2 "github.com/aws/aws-sdk-go-v2/service/ec2" awsEC2Types "github.com/aws/aws-sdk-go-v2/service/ec2/types" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/util/logging" ) const ( diff --git a/pkg/provider/aws/services/ec2/keypair/keypair.go b/pkg/provider/aws/services/ec2/keypair/keypair.go index e6e7097c..ab90acdf 100644 --- a/pkg/provider/aws/services/ec2/keypair/keypair.go +++ b/pkg/provider/aws/services/ec2/keypair/keypair.go @@ -1,10 +1,10 @@ package keypair import ( - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi-tls/sdk/v5/go/tls" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" ) type KeyPairRequest struct { @@ -32,7 +32,7 @@ func (r KeyPairRequest) Create(ctx *pulumi.Context) (*KeyPairResources, error) { r.Name, &ec2.KeyPairArgs{ PublicKey: privateKey.PublicKeyOpenssh, - Tags: qenvsContext.ResourceTags()}) + Tags: maptContext.ResourceTags()}) if err != nil { return nil, err } diff --git a/pkg/provider/aws/services/ec2/security-group/defaults.go b/pkg/provider/aws/services/ec2/security-group/defaults.go index 90fe6a76..a5dd9c75 100644 --- a/pkg/provider/aws/services/ec2/security-group/defaults.go +++ b/pkg/provider/aws/services/ec2/security-group/defaults.go @@ -1,9 +1,9 @@ package securitygroup import ( - infra "github.com/adrianriobo/qenvs/pkg/provider" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + infra "github.com/redhat-developer/mapt/pkg/provider" ) // Pick ideas from diff --git a/pkg/provider/aws/services/ec2/security-group/security-group.go b/pkg/provider/aws/services/ec2/security-group/security-group.go index 84744ce2..c1847fa8 100644 --- a/pkg/provider/aws/services/ec2/security-group/security-group.go +++ b/pkg/provider/aws/services/ec2/security-group/security-group.go @@ -1,10 +1,10 @@ package securitygroup import ( - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - infra "github.com/adrianriobo/qenvs/pkg/provider" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + infra "github.com/redhat-developer/mapt/pkg/provider" ) type IngressRules struct { @@ -35,7 +35,7 @@ func (r SGRequest) Create(ctx *pulumi.Context) (*SGResources, error) { VpcId: r.VPC.ID(), Ingress: getSecurityGroupIngressArray(r.IngressRules), Egress: ec2.SecurityGroupEgressArray{egressAll}, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err diff --git a/pkg/provider/aws/services/vpc/subnet/private.go b/pkg/provider/aws/services/vpc/subnet/private.go index fe4387b6..552aeb2d 100644 --- a/pkg/provider/aws/services/vpc/subnet/private.go +++ b/pkg/provider/aws/services/vpc/subnet/private.go @@ -3,10 +3,10 @@ package subnet import ( "fmt" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - infra "github.com/adrianriobo/qenvs/pkg/provider" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + infra "github.com/redhat-developer/mapt/pkg/provider" ) type PrivateSubnetRequest struct { @@ -33,7 +33,7 @@ func (r PrivateSubnetRequest) Create(ctx *pulumi.Context) (*PrivateSubnetResourc VpcId: r.VPC.ID(), CidrBlock: pulumi.String(r.CIDR), AvailabilityZone: pulumi.String(r.AvailabilityZone), - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err @@ -44,7 +44,7 @@ func (r PrivateSubnetRequest) Create(ctx *pulumi.Context) (*PrivateSubnetResourc &ec2.RouteTableArgs{ VpcId: r.VPC.ID(), Routes: getRoutes(r.NatGateway), - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err diff --git a/pkg/provider/aws/services/vpc/subnet/public.go b/pkg/provider/aws/services/vpc/subnet/public.go index c5b9770b..3a6f3f16 100644 --- a/pkg/provider/aws/services/vpc/subnet/public.go +++ b/pkg/provider/aws/services/vpc/subnet/public.go @@ -3,10 +3,10 @@ package subnet import ( "fmt" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - infra "github.com/adrianriobo/qenvs/pkg/provider" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + infra "github.com/redhat-developer/mapt/pkg/provider" ) type PublicSubnetRequest struct { @@ -34,7 +34,7 @@ func (r PublicSubnetRequest) Create(ctx *pulumi.Context) (*PublicSubnetResources VpcId: r.VPC.ID(), CidrBlock: pulumi.String(r.CIDR), AvailabilityZone: pulumi.String(r.AvailabilityZone), - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err @@ -56,7 +56,7 @@ func (r PublicSubnetRequest) Create(ctx *pulumi.Context) (*PublicSubnetResources &ec2.NatGatewayArgs{ AllocationId: eip.ID(), SubnetId: sn.ID(), - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err @@ -73,7 +73,7 @@ func (r PublicSubnetRequest) Create(ctx *pulumi.Context) (*PublicSubnetResources GatewayId: r.InternetGateway.ID(), }, }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err diff --git a/pkg/provider/aws/services/vpc/vpc/vpc.go b/pkg/provider/aws/services/vpc/vpc/vpc.go index ce51b9c7..7cc13250 100644 --- a/pkg/provider/aws/services/vpc/vpc/vpc.go +++ b/pkg/provider/aws/services/vpc/vpc/vpc.go @@ -3,10 +3,10 @@ package vpc import ( "fmt" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - infra "github.com/adrianriobo/qenvs/pkg/provider" "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + infra "github.com/redhat-developer/mapt/pkg/provider" ) type VPCRequest struct { @@ -25,7 +25,7 @@ func (s VPCRequest) CreateNetwork(ctx *pulumi.Context) (*VPCResources, error) { v, err := ec2.NewVpc(ctx, vName, &ec2.VpcArgs{ CidrBlock: pulumi.String(s.CIDR), - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err @@ -35,7 +35,7 @@ func (s VPCRequest) CreateNetwork(ctx *pulumi.Context) (*VPCResources, error) { iName, &ec2.InternetGatewayArgs{ VpcId: v.ID(), - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err @@ -64,7 +64,7 @@ func (s VPCRequest) CreateNetwork(ctx *pulumi.Context) (*VPCResources, error) { }, }, }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err diff --git a/pkg/provider/azure/action/windows/windows.go b/pkg/provider/azure/action/windows/windows.go index 65a0bedc..3dabdaa9 100644 --- a/pkg/provider/azure/action/windows/windows.go +++ b/pkg/provider/azure/action/windows/windows.go @@ -5,16 +5,6 @@ import ( "fmt" "strings" - "github.com/adrianriobo/qenvs/pkg/manager" - qenvsContext "github.com/adrianriobo/qenvs/pkg/manager/context" - "github.com/adrianriobo/qenvs/pkg/provider/azure" - spotprice "github.com/adrianriobo/qenvs/pkg/provider/azure/module/spot-price" - "github.com/adrianriobo/qenvs/pkg/provider/util/command" - "github.com/adrianriobo/qenvs/pkg/provider/util/output" - "github.com/adrianriobo/qenvs/pkg/provider/util/security" - "github.com/adrianriobo/qenvs/pkg/util" - "github.com/adrianriobo/qenvs/pkg/util/logging" - resourcesUtil "github.com/adrianriobo/qenvs/pkg/util/resources" "github.com/pulumi/pulumi-azure-native-sdk/compute/v2" "github.com/pulumi/pulumi-azure-native-sdk/network/v2" "github.com/pulumi/pulumi-azure-native-sdk/resources/v2" @@ -23,6 +13,16 @@ import ( "github.com/pulumi/pulumi-tls/sdk/v5/go/tls" "github.com/pulumi/pulumi/sdk/v3/go/auto" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/manager" + maptContext "github.com/redhat-developer/mapt/pkg/manager/context" + "github.com/redhat-developer/mapt/pkg/provider/azure" + spotprice "github.com/redhat-developer/mapt/pkg/provider/azure/module/spot-price" + "github.com/redhat-developer/mapt/pkg/provider/util/command" + "github.com/redhat-developer/mapt/pkg/provider/util/output" + "github.com/redhat-developer/mapt/pkg/provider/util/security" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/logging" + resourcesUtil "github.com/redhat-developer/mapt/pkg/util/resources" "golang.org/x/exp/slices" ) @@ -45,9 +45,9 @@ type WindowsRequest struct { func Create(r *WindowsRequest) (err error) { logging.Debug("Creating Windows Desktop") cs := manager.Stack{ - StackName: qenvsContext.StackNameByProject(stackCreateWindowsDesktop), - ProjectName: qenvsContext.ProjectName(), - BackedURL: qenvsContext.BackedURL(), + StackName: maptContext.StackNameByProject(stackCreateWindowsDesktop), + ProjectName: maptContext.ProjectName(), + BackedURL: maptContext.BackedURL(), ProviderCredentials: azure.DefaultCredentials, DeployFunc: r.deployer, } @@ -57,15 +57,15 @@ func Create(r *WindowsRequest) (err error) { func Destroy() error { if err := azure.Destroy( - qenvsContext.ProjectName(), - qenvsContext.BackedURL(), - qenvsContext.StackNameByProject(stackCreateWindowsDesktop)); err != nil { + maptContext.ProjectName(), + maptContext.BackedURL(), + maptContext.StackNameByProject(stackCreateWindowsDesktop)); err != nil { return err } return azure.Destroy( - qenvsContext.ProjectName(), - qenvsContext.BackedURL(), - qenvsContext.StackNameByProject(stackSyncWindowsDesktop)) + maptContext.ProjectName(), + maptContext.BackedURL(), + maptContext.StackNameByProject(stackSyncWindowsDesktop)) } // Main function to deploy all requried resources to azure @@ -78,8 +78,8 @@ func (r *WindowsRequest) deployer(ctx *pulumi.Context) error { resourcesUtil.GetResourceName(r.Prefix, azureWindowsDesktopID, "rg"), &resources.ResourceGroupArgs{ Location: pulumi.String(*location), - ResourceGroupName: pulumi.String(qenvsContext.RunID()), - Tags: qenvsContext.ResourceTags(), + ResourceGroupName: pulumi.String(maptContext.RunID()), + Tags: maptContext.ResourceTags(), }) if err != nil { return err @@ -135,7 +135,7 @@ func (r *WindowsRequest) valuesCheckingSpot() (*string, *float64, error) { // Write exported values in context to files o a selected target folder func (r *WindowsRequest) manageResults(stackResult auto.UpResult) error { - return output.Write(stackResult, qenvsContext.GetResultsOutputPath(), map[string]string{ + return output.Write(stackResult, maptContext.GetResultsOutputPath(), map[string]string{ fmt.Sprintf("%s-%s", r.Prefix, outputAdminUsername): "adminusername", fmt.Sprintf("%s-%s", r.Prefix, outputAdminUserPassword): "adminuserpassword", fmt.Sprintf("%s-%s", r.Prefix, outputUsername): "username", @@ -162,7 +162,7 @@ func (r *WindowsRequest) createVirtualMachine(ctx *pulumi.Context, ctx.Export(fmt.Sprintf("%s-%s", r.Prefix, outputAdminUsername), pulumi.String(r.AdminUsername)) ctx.Export(fmt.Sprintf("%s-%s", r.Prefix, outputAdminUserPassword), adminPasswd.Result) vmArgs := &compute.VirtualMachineArgs{ - VmName: pulumi.String(qenvsContext.RunID()), + VmName: pulumi.String(maptContext.RunID()), Location: pulumi.String(location), ResourceGroupName: rg.Name, NetworkProfile: compute.NetworkProfileArgs{ @@ -183,7 +183,7 @@ func (r *WindowsRequest) createVirtualMachine(ctx *pulumi.Context, Version: pulumi.String("latest"), }, OsDisk: compute.OSDiskArgs{ - Name: pulumi.String(qenvsContext.RunID()), + Name: pulumi.String(maptContext.RunID()), CreateOption: pulumi.String("FromImage"), Caching: compute.CachingTypesReadWrite, ManagedDisk: compute.ManagedDiskParametersArgs{ @@ -194,9 +194,9 @@ func (r *WindowsRequest) createVirtualMachine(ctx *pulumi.Context, OsProfile: compute.OSProfileArgs{ AdminUsername: pulumi.String(r.AdminUsername), AdminPassword: adminPasswd.Result, - ComputerName: pulumi.String(qenvsContext.RunID()), + ComputerName: pulumi.String(maptContext.RunID()), }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), } if spotPrice != nil { vmArgs.Priority = pulumi.String(prioritySpot) @@ -217,7 +217,7 @@ func (r *WindowsRequest) createNetworking(ctx *pulumi.Context, vn, err := network.NewVirtualNetwork(ctx, resourcesUtil.GetResourceName(r.Prefix, azureWindowsDesktopID, "vn"), &network.VirtualNetworkArgs{ - VirtualNetworkName: pulumi.String(qenvsContext.RunID()), + VirtualNetworkName: pulumi.String(maptContext.RunID()), AddressSpace: network.AddressSpaceArgs{ AddressPrefixes: pulumi.StringArray{ pulumi.String(cidrVN), @@ -225,7 +225,7 @@ func (r *WindowsRequest) createNetworking(ctx *pulumi.Context, }, ResourceGroupName: rg.Name, Location: pulumi.String(location), - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, nil, err @@ -233,7 +233,7 @@ func (r *WindowsRequest) createNetworking(ctx *pulumi.Context, sn, err := network.NewSubnet(ctx, resourcesUtil.GetResourceName(r.Prefix, azureWindowsDesktopID, "sn"), &network.SubnetArgs{ - SubnetName: pulumi.String(qenvsContext.RunID()), + SubnetName: pulumi.String(maptContext.RunID()), ResourceGroupName: rg.Name, VirtualNetworkName: vn.Name, AddressPrefixes: pulumi.StringArray{ @@ -247,12 +247,12 @@ func (r *WindowsRequest) createNetworking(ctx *pulumi.Context, resourcesUtil.GetResourceName(r.Prefix, azureWindowsDesktopID, "pip"), &network.PublicIPAddressArgs{ Location: pulumi.String(location), - PublicIpAddressName: pulumi.String(qenvsContext.RunID()), + PublicIpAddressName: pulumi.String(maptContext.RunID()), PublicIPAllocationMethod: pulumi.String("Static"), ResourceGroupName: rg.Name, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), // DnsSettings: network.PublicIPAddressDnsSettingsArgs{ - // DomainNameLabel: pulumi.String("qenvs"), + // DomainNameLabel: pulumi.String("mapt"), // }, }) if err != nil { @@ -262,12 +262,12 @@ func (r *WindowsRequest) createNetworking(ctx *pulumi.Context, ni, err := network.NewNetworkInterface(ctx, resourcesUtil.GetResourceName(r.Prefix, azureWindowsDesktopID, "ni"), &network.NetworkInterfaceArgs{ - NetworkInterfaceName: pulumi.String(qenvsContext.RunID()), + NetworkInterfaceName: pulumi.String(maptContext.RunID()), Location: pulumi.String(location), ResourceGroupName: rg.Name, IpConfigurations: network.NetworkInterfaceIPConfigurationArray{ &network.NetworkInterfaceIPConfigurationArgs{ - Name: pulumi.String(qenvsContext.RunID()), + Name: pulumi.String(maptContext.RunID()), PrivateIPAllocationMethod: pulumi.String("Dynamic"), PublicIPAddress: network.PublicIPAddressTypeArgs{ Id: publicIP.ID(), @@ -277,7 +277,7 @@ func (r *WindowsRequest) createNetworking(ctx *pulumi.Context, }, }, }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, nil, err @@ -350,7 +350,7 @@ func (r *WindowsRequest) postInitSetup(ctx *pulumi.Context, rg *resources.Resour }, "commandToExecute": setupCommand, }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }, pulumi.RetainOnDelete(true)) return privateKey, vme, err @@ -362,7 +362,7 @@ func (r *WindowsRequest) uploadScript(ctx *pulumi.Context, sa, err := storage.NewStorageAccount(ctx, resourcesUtil.GetResourceName(r.Prefix, azureWindowsDesktopID, "sa"), &storage.StorageAccountArgs{ - AccountName: pulumi.String(qenvsContext.RunID()), + AccountName: pulumi.String(maptContext.RunID()), Kind: pulumi.String("BlockBlobStorage"), ResourceGroupName: rg.Name, Location: pulumi.String(location), @@ -370,7 +370,7 @@ func (r *WindowsRequest) uploadScript(ctx *pulumi.Context, Sku: &storage.SkuArgs{ Name: pulumi.String("Premium_LRS"), }, - Tags: qenvsContext.ResourceTags(), + Tags: maptContext.ResourceTags(), }) if err != nil { return nil, err @@ -378,7 +378,7 @@ func (r *WindowsRequest) uploadScript(ctx *pulumi.Context, c, err := storage.NewBlobContainer(ctx, resourcesUtil.GetResourceName(r.Prefix, azureWindowsDesktopID, "co"), &storage.BlobContainerArgs{ - ContainerName: pulumi.String(qenvsContext.RunID()), + ContainerName: pulumi.String(maptContext.RunID()), AccountName: sa.Name, ResourceGroupName: rg.Name, PublicAccess: storage.PublicAccessBlob, diff --git a/pkg/provider/azure/azure.go b/pkg/provider/azure/azure.go index 0ee8e666..eb0efaba 100644 --- a/pkg/provider/azure/azure.go +++ b/pkg/provider/azure/azure.go @@ -1,8 +1,8 @@ package azure import ( - "github.com/adrianriobo/qenvs/pkg/manager" - "github.com/adrianriobo/qenvs/pkg/manager/credentials" + "github.com/redhat-developer/mapt/pkg/manager" + "github.com/redhat-developer/mapt/pkg/manager/credentials" ) func GetClouProviderCredentials(fixedCredentials map[string]string) credentials.ProviderCredentials { diff --git a/pkg/provider/azure/module/spot-price/spot-price.go b/pkg/provider/azure/module/spot-price/spot-price.go index e7aa3fe7..b74dfb03 100644 --- a/pkg/provider/azure/module/spot-price/spot-price.go +++ b/pkg/provider/azure/module/spot-price/spot-price.go @@ -12,8 +12,8 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph" - "github.com/adrianriobo/qenvs/pkg/util" - "github.com/adrianriobo/qenvs/pkg/util/logging" + "github.com/redhat-developer/mapt/pkg/util" + "github.com/redhat-developer/mapt/pkg/util/logging" "golang.org/x/exp/maps" ) diff --git a/pkg/provider/util/output/output.go b/pkg/provider/util/output/output.go index 6274bc31..8f22a27d 100644 --- a/pkg/provider/util/output/output.go +++ b/pkg/provider/util/output/output.go @@ -4,8 +4,8 @@ import ( "os" "path" - "github.com/adrianriobo/qenvs/pkg/util/logging" "github.com/pulumi/pulumi/sdk/v3/go/auto" + "github.com/redhat-developer/mapt/pkg/util/logging" ) func Write(stackResult auto.UpResult, destinationFolder string, results map[string]string) (err error) { diff --git a/pkg/provider/util/windows/windows.go b/pkg/provider/util/windows/windows.go index 04c3d9de..e792de17 100644 --- a/pkg/provider/util/windows/windows.go +++ b/pkg/provider/util/windows/windows.go @@ -5,10 +5,10 @@ import ( "encoding/base64" "fmt" - "github.com/adrianriobo/qenvs/pkg/util/file" "github.com/pulumi/pulumi-random/sdk/v4/go/random" "github.com/pulumi/pulumi-tls/sdk/v5/go/tls" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/redhat-developer/mapt/pkg/util/file" ) //go:embed userdata.ps1.tpl diff --git a/pkg/util/resources/resources.go b/pkg/util/resources/resources.go index e82468c1..5eb85117 100644 --- a/pkg/util/resources/resources.go +++ b/pkg/util/resources/resources.go @@ -4,9 +4,9 @@ import "fmt" // Returns the unique name to identify a resoruces within // pulumi context -func GetResourceName(prefix, qenvsComponentID, resourceTypeAbbrev string) string { +func GetResourceName(prefix, maptComponentID, resourceTypeAbbrev string) string { if len(prefix) > 0 { - return fmt.Sprintf("%s-%s-%s", prefix, qenvsComponentID, resourceTypeAbbrev) + return fmt.Sprintf("%s-%s-%s", prefix, maptComponentID, resourceTypeAbbrev) } - return fmt.Sprintf("%s-%s", qenvsComponentID, resourceTypeAbbrev) + return fmt.Sprintf("%s-%s", maptComponentID, resourceTypeAbbrev) } diff --git a/tkn/infra-aws-fedora.yaml b/tkn/infra-aws-fedora.yaml index 851656e0..74bb15f8 100644 --- a/tkn/infra-aws-fedora.yaml +++ b/tkn/infra-aws-fedora.yaml @@ -18,7 +18,7 @@ spec: The machine will offer nested virtualizataion capabilities as so it should be spin on a dedicated (baremetal) machine params: - # Qenvs params + # mapt params - name: project-name description: identifier for project. - name: backed-url @@ -77,7 +77,7 @@ spec: steps: - name: provisioner - image: quay.io/rhqp/qenvs:v0.7.0-dev + image: quay.io/redhat-developer/mapt:v0.7.0-dev imagePullPolicy: Always script: | #!/bin/sh @@ -101,8 +101,8 @@ spec: rm -rf ${workspace_path}/.pulumi/locks/* fi - # Run qenvs - cmd="qenvs aws fedora $(params.operation) " + # Run mapt + cmd="mapt aws fedora $(params.operation) " cmd="$cmd --project-name $(params.project-name) " # Set the backed url if [[ $(params.backed-url) != "" ]]; then diff --git a/tkn/infra-aws-mac.yaml b/tkn/infra-aws-mac.yaml index aa2c87ae..5e130f8e 100644 --- a/tkn/infra-aws-mac.yaml +++ b/tkn/infra-aws-mac.yaml @@ -18,7 +18,7 @@ spec: The machine will offer nested virtualizataion capabilities as so it should be spin on a dedicated (baremetal) machine params: - # Qenvs params + # mapt params - name: project-name description: identifier for project. - name: backed-url @@ -96,7 +96,7 @@ spec: steps: - name: provisioner - image: quay.io/rhqp/qenvs:v0.7.0-dev + image: quay.io/redhat-developer/mapt:v0.7.0-dev imagePullPolicy: Always script: | #!/bin/sh @@ -120,8 +120,8 @@ spec: rm -rf ${workspace_path}/.pulumi/locks/* fi - # Run qenvs - cmd="qenvs aws mac $(params.operation) " + # Run mapt + cmd="mapt aws mac $(params.operation) " cmd="$cmd --project-name $(params.project-name) " # Set the backed url if [[ $(params.backed-url) != "" ]]; then diff --git a/tkn/infra-aws-rhel.yaml b/tkn/infra-aws-rhel.yaml index e1d48589..8bbdb676 100644 --- a/tkn/infra-aws-rhel.yaml +++ b/tkn/infra-aws-rhel.yaml @@ -18,7 +18,7 @@ spec: The machine will offer nested virtualizataion capabilities as so it should be spin on a dedicated (baremetal) machine params: - # Qenvs params + # mapt params - name: project-name description: identifier for project. - name: backed-url @@ -81,7 +81,7 @@ spec: steps: - name: provisioner - image: quay.io/rhqp/qenvs:v0.7.0-dev + image: quay.io/redhat-developer/mapt:v0.7.0-dev imagePullPolicy: Always script: | #!/bin/sh @@ -105,8 +105,8 @@ spec: rm -rf ${workspace_path}/.pulumi/locks/* fi - # Run qenvs - cmd="qenvs aws rhel $(params.operation) " + # Run mapt + cmd="mapt aws rhel $(params.operation) " cmd="$cmd --project-name $(params.project-name) " # Set the backed url if [[ $(params.backed-url) != "" ]]; then diff --git a/tkn/infra-aws-windows-server.yaml b/tkn/infra-aws-windows-server.yaml index 6cf15601..1c945262 100644 --- a/tkn/infra-aws-windows-server.yaml +++ b/tkn/infra-aws-windows-server.yaml @@ -18,7 +18,7 @@ spec: The machine will offer nested virtualizataion capabilities as so it should be spin on a dedicated (baremetal) machine params: - # Qenvs params + # mapt params - name: project-name description: identifier for project. - name: backed-url @@ -86,7 +86,7 @@ spec: steps: - name: provisioner - image: quay.io/rhqp/qenvs:v0.7.0-dev + image: quay.io/redhat-developer/mapt:v0.7.0-dev imagePullPolicy: Always script: | #!/bin/sh @@ -110,8 +110,8 @@ spec: rm -rf ${workspace_path}/.pulumi/locks/* fi - # Run qenvs - cmd="qenvs aws windows $(params.operation) " + # Run mapt + cmd="mapt aws windows $(params.operation) " cmd="$cmd --project-name $(params.project-name) " # Set the backed url if [[ $(params.backed-url) != "" ]]; then diff --git a/tkn/infra-azure-windows-desktop.yaml b/tkn/infra-azure-windows-desktop.yaml index 7e4dff35..c3ff2d2a 100644 --- a/tkn/infra-azure-windows-desktop.yaml +++ b/tkn/infra-azure-windows-desktop.yaml @@ -41,6 +41,9 @@ spec: - name: spot description: in case spot is set to true it will check for best spot price and create the VM on the target region default: 'true' + - name: spot-eviction-tolerance + description: 'if spot is enable we can define the minimum tolerance level of eviction. Allowed value are: lowest, low, medium, high or highest' + default: 'lowest' - name: workspace-resources-path description: path on workspace where to store ephemeral assets related with the provisioning - name: remove-lock @@ -59,7 +62,7 @@ spec: steps: - name: provisioner - image: quay.io/rhqp/qenvs:v0.7.0-dev + image: quay.io/redhat-developer/mapt:v0.7.0-dev imagePullPolicy: Always script: | #!/bin/sh @@ -88,8 +91,8 @@ spec: rm -rf ${workspace_path}/.pulumi/locks/* fi - # Run qenvs - cmd="qenvs azure windows $(params.operation) " + # Run mapt + cmd="mapt azure windows $(params.operation) " cmd="$cmd --project-name $(params.project-name) " if [[ $(params.backed-url) != "" ]]; then cmd="$cmd --backed-url $(params.backed-url) " @@ -103,6 +106,7 @@ spec: cmd="$cmd --vmsize $(params.vmsize) " if [[ $(params.spot) == "true" ]]; then cmd="$cmd --spot " + cmd="$cmd --spot-eviction-tolerance $(params.spot-eviction-tolerance) " fi fi eval "${cmd}" diff --git a/tools/go.mod b/tools/go.mod index 85d92e5d..ced34609 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,4 +1,4 @@ -module github.com/adrianriobo/qenvs/tools +module github.com/redhat-developer/mapt/tools go 1.21