{"id":28376049,"url":"https://github.com/purestorage-openconnect/px-deploy","last_synced_at":"2026-02-12T10:08:06.274Z","repository":{"id":38192840,"uuid":"232312210","full_name":"PureStorage-OpenConnect/px-deploy","owner":"PureStorage-OpenConnect","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-20T16:58:51.000Z","size":2191,"stargazers_count":41,"open_issues_count":35,"forks_count":32,"subscribers_count":19,"default_branch":"master","last_synced_at":"2026-01-21T01:40:28.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PureStorage-OpenConnect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-01-07T11:41:18.000Z","updated_at":"2026-01-20T16:49:37.000Z","dependencies_parsed_at":"2024-02-02T12:28:54.164Z","dependency_job_id":"e7ce423b-1fd1-4c6c-b673-5102b40c45a6","html_url":"https://github.com/PureStorage-OpenConnect/px-deploy","commit_stats":null,"previous_names":["purestorage-openconnect/px-deploy"],"tags_count":74,"template":false,"template_full_name":null,"purl":"pkg:github/PureStorage-OpenConnect/px-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2Fpx-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2Fpx-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2Fpx-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2Fpx-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PureStorage-OpenConnect","download_url":"https://codeload.github.com/PureStorage-OpenConnect/px-deploy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PureStorage-OpenConnect%2Fpx-deploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29363010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-30T00:05:06.497Z","updated_at":"2026-02-12T10:08:06.268Z","avatar_url":"https://github.com/PureStorage-OpenConnect.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What\n\nThis will deploy one or more clusters in the cloud, with optional post-install tasks defined by template.\n\n\u003e [!CAUTION]\n\u003e The intended purpose of PX-Deploy is to provision demo and lab clusters as quickly as possible and then destroy them when the session is complete. Nothing should be considered suitable for production.\n\n# Supported platforms\n\n## Container\n * Kubernetes\n * Openshift 4 (only on AWS at this time)\n * EKS (only makes sense on AWS)\n * AKS (only makes sense on Azure)\n * GKE (only makes sense on GCP)\n\n## Cloud\n * AWS\n * Azure\n * GCP\n * vSphere\n\n## Install \u0026 Update\n\n0. You need a Unix-like OS. This can be Linux, MacOS or WSL if you are on Windows. Do not use Powershell or Git Bash.\n\n1. Install and enable a container runtime such as Docker. On MacOS with Apple Silicon, it is recommended you use [Docker Desktop](https://www.docker.com/products/docker-desktop/).\n\n2. Install the [Git CLI](https://github.com/git-guides/install-git).\n\n3. Install bash-completion (optional), eg:\n```\n$ brew install bash-completion\n```\nYou will need to restart your shell.\n\n4. Run the install / update script:\n```\ncurl https://raw.githubusercontent.com/PureStorage-OpenConnect/px-deploy/master/install.sh | bash\n```\nThis will:\n * pull the Docker image from Github\n * create and populate `$HOME/.px-deploy`\n * provide instructions to configure `.bash_profile`/`.zshrc`\n\nIt may take 5-10 minutes to complete, longer with a slow Internet connection.\n\nUpdate your `.bash_profile` or `.zshrc` as directed. Source them or login again. Validate it is complete with `px-deploy -h`.\n\nInstall the optional [cron job](https://github.com/PureStorage-OpenConnect/px-deploy/blob/master/docs/cron.md).\n\nReview the various cloud settings in `~/.px-deploy/defaults.yml`.\n\n5. Configure Cloud specific settings\n\n[Notes for AWS](#notes-for-aws)\n\n[Notes for Azure](#notes-for-azure)\n\n[Notes for GCP](#notes-for-gcp)\n\n[Notes for vSphere](#notes-for-vsphere)\n\n[Notes for OCP4 + AWS](https://github.com/purestorage-openconnect/px-deploy/tree/master/docs/cloud/aws/ocp4.md)\n\n### Notes for Updating\n\n* Run the same steps to update your px-deploy installation\n\n* Please don't change the default scripts / templates as they will be overwritten during update. Feel free to create your own scripts / templates.\n\n* Your `defaults.yml` will no longer be replaced. After updating please check if the new release supports newer Kubernetes / Portworx versions and update it manually.\n* You'll find this information in `$HOME/.px-deploy/defaults.yml.VERSION`\n\n* When updating from version \u003c 5.0.0, please destroy all AWS / AWSTF Cloud based deployments in advance. Version 5 cannot destroy these deployments any longer.\n\n* Update your `.bashrc` or `.zshrc` with the new px-deploy alias.\n\n## Use\n\nThis will provision a VPC and some other objects, and deploy into it from the template:\n```\npx-deploy create --name=my-deployment --template=clusterpair\n```\n\nConnect via SSH:\n```\npx-deploy connect --name my-deployment\n```\n\nExecute a command:\n```\npx-deploy connect --name my-deployment \"storkctl get clusterpair\"\n```\n\nStop instances (to reduce AWS costs):\n```\npx-deploy stop --name my-deployment\n```\n\nStart instances:\n```\npx-deploy start --name my-deployment\n```\n\nTear down the deployment:\n```\npx-deploy destroy --name my-deployment\n```\n\n# NOTES\n\nThe deployments can be listed:\n```\n$ px-deploy list\nDEPLOYMENT  CLOUD  REGION         PLATFORM  TEMPLATE  CLUSTERS  NODES  CREATED\nfoo         aws    eu-west-1      k8s       px               1      3  2020-02-11T16:14:06Z\nbar         gcp    europe-north1  gcp       \u003cnone\u003e           1      3  2020-02-04T09:50:11Z\n```\n\nThe templates can be listed:\n```\n$ px-deploy templates\nNAME                         DESCRIPTION\nasync-dr                     Deploys 2 clusters with Portworx, sets up and configures a cluster pairing,\n                             configures an async DR schedule with a loadbalancer in front of the setup.\nbackup-restore               Deploys a Kubernetes cluster, Minio S3 storage, Petclinic Application and\n                             Backup/Restore config\nceph                         Install and run Ceph on each cluster\ndude                         Deploys clusters with Portworx, sets up and configures a cluster pairing from\n                             odd to even clusters, configures an async DR schedule, installs PX-Backup on the\n                             last cluster\neks-multicloud-target        setup EKS cluster with PX as clusterpair migration target\nkubevirt                     Install kubevirt on a bare-metal cluster\nmetro                        Deploys 2 K8s clusters in AWS with a stretched Portworx cluster. It configures\n                             Metro, a GUI and Petclinic, ready for a manual failover demo\nmigration                    Deploys 2 clusters with Portworx, sets up and configures a cluster pairing, and\n                             deploys a set of apps and a migration template.\nocp-kubevirt                 Two Cluster OCP Virtualization Demo with Backup \u0026 AsyncDR on a aws bare-metal\npx-backup                    A single Kubernetes cluster with Portworx and PX-Backup via Helm installed\npx                           A single Kubernetes cluster with Portworx installed\ntraining                     Deploys training clusters\n```\n\nGenerate kubeconfig files so you can run kubectl from your laptop:\n```\n$ px-deploy kubeconfig --name exampleDeployment\n$ kubectl get nodes --kubeconfig $HOME/.px-deploy/kubeconfig/exampleDeployment.1\nNAME                                           STATUS   ROLES    AGE   VERSION\nip-192-168-5-19.eu-west-1.compute.internal     Ready    \u003cnone\u003e   11m   v1.21.5-eks-9017834\nip-192-168-56-14.eu-west-1.compute.internal    Ready    \u003cnone\u003e   11m   v1.21.5-eks-9017834\nip-192-168-74-141.eu-west-1.compute.internal   Ready    \u003cnone\u003e   11m   v1.21.5-eks-9017834\n```\nNote this is currently only tested with EKS.\n\nThe `defaults.yml` file sets a number of deployment variables:\n * `aws_ebs` - a list of EBS volumes to be attached to each worker node. This is a space-separated list of type:size pairs, for example: `\"gp2:30 standard:20\"` will provision a gp2 volume of 30 GB and a standard volume of 20GB\n * `aws_region` - AWS region\n * `aws_type` - the AWS machine type for each node\n * `aws_access_key_id` - your AWS API access key\n * `aws_secret_access_key` - your AWS API secret access key\n * `eks_version` - EKS k8s Version\n * `cloud` - the cloud on which to deploy (aws, gcp, or vsphere)\n * `ssh_pub_key` - ssh public key which will be added for root access on each node\n * `clusters` - the number of clusters to deploy\n * `k8s_version` - the version of Kubernetes to deploy\n * `tags` - a list of tags to be applied to each node. This is a comma-separate list of name=value pairs, for example: `\"Owner=Bob,Purpose=Demo\"`\n * `nodes` - the number of worker nodes on each cluster\n * `lock` - prevents deployment from being deleted by `px-deploy destroy ...`. use `px-deploy unlock -n ...` to unlock \n * `platform` - can be set to either k8s, none, ocp4, eks or gke\n * `azure_type` - the Azure machine type for each node\n * `azure_disks` - similar to aws_ebs, for example: `\"Standard_LRS:49 Premium_LRS:50\"` \n * `azure_client_id` - Azure Client ID\n * `azure_client_secret` - Azure Access Secret\n * `azure_subscription_id` - Azure Subscription ID\n * `azure_tenant_id` - Azure Tenant ID\n * `aks_version` - AKS k8s Version\n * `px_version` - the version of Portworx to install\n * `gcp_project` - GCP project\n * `gcp_disks` - similar to aws_ebs, for example: `\"pd-standard:20 pd-ssd:30\"`\n * `gcp_region` - GCP region\n * `gcp_type` - the GCP machine type for each node\n * `gcp_zone` - GCP zone\n * `gke_version` - GKE k8s Version\n * `vsphere_host` - endpoint\n * `vsphere_compute_resource` - compute resource\n * `vsphere_user` - user with which to provision VMs\n * `vsphere_password` - password\n * `vsphere_template` - full path to CentOS 7 template\n * `vsphere_datacenter` - vcenter datacenter\n * `vsphere_datastore` - datastore prefix\n * `vsphere_folder` - folder for vSphere VMs\n * `vsphere_disks` - similar to aws_ebs, for example: `\"20 30\"` (NOTE: these are not provisioned as static block devices, but they are used as clouddrives)\n * `vsphere_network` - vSwitch or dvPortGroup for cluster ex: Team-SE-120\n * `vsphere_memory` - RAM in GB\n * `vsphere_cpu` - number of vCPUs\n * `vsphere_repo` - repository to pull vsphere template\n * `ocp4_domain` - domain that has been delegated to route53\n * `ocp4_version` - eg `4.3.0`\n * `ocp4_credentials_mode` - (Optional) set OCP4 CCO credentialsMode. Defaults to \"Mint\", you may change to \"Passthrough\"\n * `ocp4_pull_secret` - the pull secret `'{\"auths\" ... }'`\n\nThere are two ways to override these variables. The first is to specify a template with the `--template=...` parameter.  The second way to override the defaults is to specify on the command line. See `px-deploy create -h` for a full list. For example, to deploy petclinic into the `foo` deployment:\n```\npx-deploy create --name=foo --clusters=5 --template=petclinic --nodes=6\n```\n\nThis example is a mixture of both methods. The template is applied, then the command line parameters are applied, so not only is the template overriding the defaults, but also the parameters are overriding the template.\n\n`scripts` is a list of scripts to be executed on each master node. For example:\n```\n$ cat ~/.px-deploy/scripts/petclinic\n# Install petclinic on each cluster\nkubectl apply -f /assets/petclinic.yml\n```\n\nThese variables are passed to the script:\n * `$nodes`\n * `$clusters`\n * `$px_version`\n * `$k8s_version`\n\nYou can also select a different defaults file with:\n```\n$ DEFAULTS=/path/to/other/defaults.yml px-deploy create ...\n```\n\nAll files in `~/.px-deploy/assets` will be copied to `/assets` on the master nodes. They are then available to be used by the script, as above.\n\nIn addition to these, there are some more variables available:\n * `$cluster` - cluster number\n\nThere is also an optional cluster object. At the moment, all it can be used for is defining cluster-specific scripts. These will be executed after the scripts above. For example:\n```\ncluster:\n- id: 1\n  scripts: [\"script-1\", \"script-2\"]\n- id: 2\n  scripts: [\"script-3\", \"script-4\"]\n```\n\nLast, environment variables can be define in templates or defaults.yml, and these are also available to scripts:\n```\n$ cat templates/metro.yml\n...\nenv:\n  licenses: \"XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX\"\n```\nEnviroment variables can also be defined on the command line:\n```\npx-deploy create -n foo -t migration -e install_apps=true,foo=bar\n```\n\nThe `install-px` script looks for an environment variable called `cloud_drive`. If it exists, it will deploy Portworx using a clouddrive rather than looking for all attached devices. Note that this is a requirement for Openshift 4. For example:\n```\npx-deploy create -n foo -t px --cloud aws -e cloud_drive=type%3Dgp2%2Csize%3D150\npx-deploy create -n foo -t px --cloud aws --platform eks -e cloud_drive=type%3Dgp2%2Csize%3D150\npx-deploy create -n bar -t px --cloud aws --platform ocp4 -e cloud_drive=type%3Dgp2%2Csize%3D150\npx-deploy create -n baz -t px --cloud gcp --platform gke -e cloud_drive=\"type%3Dpd-standard%2Csize%3D150\"\npx-deploy create -n foo -t px --cloud azure --platform aks -e cloud_drive=\"type%3DStandard_LRS%2Csize%3D150\"\n```\n# Notes for AWS\n\nIf you are using AWS and you have not accepted the Rocky Linux 8 terms, browse to https://aws.amazon.com/marketplace/pp/prodview-2otariyxb3mqu\n\nEdit your `defaults.yml` to set `aws_access_key_id` and `aws_secret_access_key`.\n\n# Notes for Azure\n\n1. Get access to Azure cli (either you install or use Cloud Shell on Azure UI)\n\n2. Edit your `defaults.yml` to set `azure_tenant_id`, `azure_subscription_id`, `azure_client_id`, `azure_client_secret`.\n\n```\n$ az account list\n```\n\nvalue of `id` is your `azure_subscription_id` value\n\nvalue of `tenant` is your `azure_tenant_id` value\n\n3. create application secret\n\n```\n$ az ad sp create-for-rbac --role=\"Contributor\" --scopes=\"/subscriptions/[your azure_subscription_id]\"\n```\n\nvalue of `appId` is your `azure_client_id`\n\nvalue of `password` is your `azure_client_secret`\n\n4. accept RockyLinux EULA\n\n```\n$ az vm image terms accept --urn \"resf:rockylinux-x86_64:9-base:9.5.20241118\" \n```\n\n# Notes for GCP\n\n**tl;dr**\n\n- setup a project\n\n- create service account with roles compute.admin,container.admin,iam.serviceAccountUser\n\n- download json key file for service account and move it as **`gcp.json`** into your ~/.px-deploy folder\n\n- set gcp_project in ~/.px-deploy/defaults.yml\n\n**Detailed:**\n\n1. install CLI and ensure it is configured: https://cloud.google.com/sdk/docs/quickstarts\n\n2. you can copy \u0026 paste the following commands. just ensure to replace all values shown in [brackets] with your specific values - without the [brackets]\n\n3. set env variable for project / service account (example here **`px-deploy-proj`** and **`px-deploy-sa`**)\n\n```\nPX_DEPLOY_PROJECT=\"[px-deploy-proj]\"\n\nSERVICE_ACCOUNT=\"[px-deploy-sa]\"\n```\n\n4. create a new project and set it as default\n\n```\ngcloud projects create ${PX_DEPLOY_PROJECT}\n\ngcloud config set project ${PX_DEPLOY_PROJECT}\n```\n\n5. get your billing account id \n\n```\ngcloud beta billing accounts list\n```\n\nOutput will look like this:\n\n```\nACCOUNT_ID            NAME                OPEN  MASTER_ACCOUNT_ID\n\n654321-ABCDEF-123456  My Billing Account  True\n```\n6. link your project to billing account id  (here **`654321-ABCDEF-123456`**)\n\n```\ngcloud beta billing projects link ${PX_DEPLOY_PROJECT} --billing-account [654321-ABCDEF-123456]\n```\n\n7. create service account\n\n```\ngcloud iam service-accounts create ${SERVICE_ACCOUNT}\n```\n\n8. assign roles to service-account\n \n```\ngcloud projects add-iam-policy-binding ${PX_DEPLOY_PROJECT} \\\n   --member=\"serviceAccount:${SERVICE_ACCOUNT}@${PX_DEPLOY_PROJECT}.iam.gserviceaccount.com\" \\\n   --role=\"roles/compute.admin\"\n\ngcloud projects add-iam-policy-binding ${PX_DEPLOY_PROJECT} \\\n   --member=\"serviceAccount:${SERVICE_ACCOUNT}@${PX_DEPLOY_PROJECT}.iam.gserviceaccount.com\" \\\n   --role=\"roles/container.admin\"\n\ngcloud projects add-iam-policy-binding ${PX_DEPLOY_PROJECT} \\\n   --member=\"serviceAccount:${SERVICE_ACCOUNT}@${PX_DEPLOY_PROJECT}.iam.gserviceaccount.com\" \\\n   --role=\"roles/iam.serviceAccountUser\"  \n```\n\n9. download service account json key file (here **`gcp.json`**)\n\n```\ngcloud iam service-accounts keys create gcp.json \\\n    --iam-account=${SERVICE_ACCOUNT}@${PX_DEPLOY_PROJECT}.iam.gserviceaccount.com\n```\n\n10. move **`gcp.json`** into your ~/.px-deploy/ folder\n\n```\nmv gcp.json ~/.px-deploy/\n```\n\n11. enable compute \u0026 kubernetes API\n\n```\ngcloud services enable container.googleapis.com\n\ngcloud services enable compute.googleapis.com\n```\n\n12. edit your `~/.px-deploy/defaults.yml` to add \n\n```\ngcp_project: \"[px-deploy-proj]\"\n```\n\n# Notes for vSphere\n\nBefore you can start deploying in vSphere, a local VM template must be installed. The command\n```\n$ px-deploy vsphere-init\n```\nwill read the vsphere variables from `defaults.yml` (please check in advance if they are correct) and provision a template at the path defined in `vsphere_template`.\n\n# Known Issues \n\n## Known Issues on EKS\n\nIf you see on AWS UI an error message like this: `Your current IAM principal doesn’t have access to Kubernetes objects on this cluster.` the IAM user being used to create the deployment isn't the same IAM user running the AWS UI. \n\nOne reason could be that access to AWS UI is authenticated using SSO. \n\nTo fix the isse find out the user/role being used by AWS UI (e.g. by running `aws sts get-caller-identity` on AWS UI CloudShell) and set one of the following ENV variables in ~/.px-deploy/defaults.yml (in my example its the `OktaSSOAdminUser` Role / `developerUser1` user)\n\n```\nenv:\n    AWS_ADD_EKS_IAM_ROLE: \"OktaSSOAdminUser\"\n    AWS_ADD_EKS_IAM_USER: \"developerUser1\"\n```\n\nMore information can be found here https://docs.aws.amazon.com/eks/latest/userguide/view-kubernetes-resources.html#view-kubernetes-resources-permissions\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurestorage-openconnect%2Fpx-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurestorage-openconnect%2Fpx-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurestorage-openconnect%2Fpx-deploy/lists"}