Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove openvpn #6441

Merged
merged 8 commits into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions docs/source/reference/1-commcare-cloud/commands.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion environments/india/terraform.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@ az_codes:
- c
vpc_begin_range: "10.203"

openvpn_image: ami-085d67fbfe42a25e7

vpn_connections: []

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

openvpn_image: ami-5e73b923

ec2_metadata_tokens_required: yes

1 change: 0 additions & 1 deletion environments/staging/terraform.yml
Original file line number Diff line number Diff line change
@@ -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"
1 change: 0 additions & 1 deletion src/commcare_cloud/ansible/host_group_aliases.yml
Original file line number Diff line number Diff line change
@@ -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:
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
@@ -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
3 changes: 0 additions & 3 deletions src/commcare_cloud/commcare_cloud.py
Original file line number Diff line number Diff line change
@@ -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
@@ -104,8 +103,6 @@
AwsSignIn,
AwsList,
AwsFillInventory,
OpenvpnActivateUser,
OpenvpnClaimUser,
ForwardPort,
])
])
3 changes: 0 additions & 3 deletions src/commcare_cloud/environment/schemas/terraform.py
Original file line number Diff line number Diff line change
@@ -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")
Loading