Skip to content

Commit

Permalink
Merge pull request #6441 from dimagi/ap/remove-openvpn
Browse files Browse the repository at this point in the history
Remove openvpn
  • Loading branch information
AmitPhulera authored Nov 20, 2024
2 parents 6a6b0d8 + 2b14adf commit 21fa1a1
Show file tree
Hide file tree
Showing 17 changed files with 1 addition and 535 deletions.
54 changes: 0 additions & 54 deletions docs/source/reference/1-commcare-cloud/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1693,60 +1693,6 @@ have been made to our actual resources in AWS.
---
#### ``openvpn-activate-user`` Command
Give a OpenVPN user a temporary password (the ansible user password)
```
commcare-cloud <env> openvpn-activate-user [--use-factory-auth] vpn_user
```
to allow the user to connect to the VPN, log in, and change their password using
```
cchq <env> openvpn-claim-user
```
##### Positional Arguments
###### `vpn_user`
The user to activate.
Must be one of the defined ssh users defined for the environment.
##### Options
###### `--use-factory-auth`
authenticate using the pem file (or prompt for root password if there is no pem file)
---
#### ``openvpn-claim-user`` Command
Claim an OpenVPN user as your own, setting its password
```
commcare-cloud <env> openvpn-claim-user [--use-factory-auth] vpn_user
```
##### Positional Arguments
###### `vpn_user`
The user to claim.
Must be one of the defined ssh users defined for the environment.
##### Options
###### `--use-factory-auth`
authenticate using the pem file (or prompt for root password if there is no pem file)
---
#### ``forward-port`` Command
Port forward to access a remote admin console
Expand Down
1 change: 0 additions & 1 deletion environments/india/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ az_codes:
- c
vpc_begin_range: "10.203"

openvpn_image: ami-085d67fbfe42a25e7

vpn_connections: []

Expand Down
1 change: 0 additions & 1 deletion environments/production/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ azs:
- "us-east-1c"
vpc_begin_range: "10.202"

openvpn_image: ami-5e73b923

ec2_metadata_tokens_required: yes

Expand Down
1 change: 0 additions & 1 deletion environments/staging/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ azs:
- "us-east-1c"
vpc_begin_range: "10.201"

openvpn_image: ami-5e73b923

backup_plan:
local_vault_name: "BusinessContinuity_Staging_East-1"
Expand Down
1 change: 0 additions & 1 deletion src/commcare_cloud/ansible/host_group_aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
hostname: "{{ item }}"
groups: all_commcarehq
with_items: "{{ groups['all'] }}"
when: "item not in groups['openvpn']|default([])"
changed_when: no
- name: Create commcarehq group alias
add_host:
Expand Down
15 changes: 0 additions & 15 deletions src/commcare_cloud/ansible/openvpn_playbooks/activate_vpn_user.yml

This file was deleted.

This file was deleted.

This file was deleted.

53 changes: 0 additions & 53 deletions src/commcare_cloud/commands/terraform/openvpn.py

This file was deleted.

10 changes: 1 addition & 9 deletions src/commcare_cloud/commands/terraform/templates/variables.tf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ variable "vpc_begin_range" {}

# OptInRequired: In order to use this AWS Marketplace product you need to accept terms and subscribe.
# To do so please visit http://aws.amazon.com/marketplace/pp?sku=3ihdqli79gl9v2jnlzs6nq60h
variable "openvpn_image" {
default = "" # will be auto-assigned by openvpn module if not set
}
variable "openvpn_instance_type" {
default = "t2.small"
}
variable "openvpn_az" {
default = "a"
}


data "aws_ami" "ubuntu_bionic" {
# Should match what is in
Expand Down
3 changes: 0 additions & 3 deletions src/commcare_cloud/commcare_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from commcare_cloud.commands.secrets import Secrets, MigrateSecrets
from commcare_cloud.commands.sentry import ExportSentryEvents
from commcare_cloud.commands.terraform.aws import AwsList, AwsFillInventory, AwsSignIn
from commcare_cloud.commands.terraform.openvpn import OpenvpnActivateUser, OpenvpnClaimUser
from commcare_cloud.commands.terraform.terraform import Terraform
from commcare_cloud.commands.terraform.terraform_migrate_state import TerraformMigrateState
from commcare_cloud.commands.validate_environment_settings import ValidateEnvironmentSettings
Expand Down Expand Up @@ -104,8 +103,6 @@
AwsSignIn,
AwsList,
AwsFillInventory,
OpenvpnActivateUser,
OpenvpnClaimUser,
ForwardPort,
])
])
Expand Down
3 changes: 0 additions & 3 deletions src/commcare_cloud/environment/schemas/terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ class TerraformConfig(jsonobject.JsonObject):
state_bucket_region = jsonobject.StringProperty()
region = jsonobject.StringProperty()
environment = jsonobject.StringProperty()
openvpn_image = jsonobject.StringProperty()
openvpn_instance_type = jsonobject.StringProperty()
openvpn_az = jsonobject.StringProperty()
azs = jsonobject.ListProperty(str)
az_codes = jsonobject.ListProperty(str, default=['a', 'b', 'c'])
ssl_policy = jsonobject.StringProperty(default="ELBSecurityPolicy-2016-08")
Expand Down
Loading

0 comments on commit 21fa1a1

Please sign in to comment.