From 29582331cb0923efc831437cae0a0b0c8a6df19c Mon Sep 17 00:00:00 2001
From: thevickypedia Initiates Assigns a name to the PEM file, initiates the logger, client and resource for EC2 using Unpacks the kwargs and loads it as Envconfig, the subclass for BaseSettings validated using pydantic. logger – Bring your own logger. kwargs – Dictionary of keyword arguments for the following key-value pairs. See also Access point to the VPN server will be the combination of subdomain and hosted_zone. Please note that the hosted zone should also be a registered domain in AWS. You cannot simply create a hosted zone named google.com and expect it to work. Flag to indicate the calling function whether the security group was authorized. Flag to indicate the calling function, whether the security group was authorized successfully. bool
+Styling conventions: [`PEP 8`](https://www.python.org/dev/peps/pep-0008/)
+Clean code with pre-commit hooks: [`flake8`](https://flake8.pycqa.org/en/latest/) and
+[`isort`](https://pycqa.github.io/isort/)
+
+### [Release Notes](https://github.com/thevickypedia/vpn-server/blob/main/release_notes.rst)
+**Requirement**
+```shell
+python -m pip install gitverse
+```
+
+**Usage**
+```shell
+gitverse-release reverse -f release_notes.rst -t 'Release Notes'
+```
+
+### Linting
+`PreCommit` will ensure linting, and the doc creation are run on every commit.
+
+**Requirement**
+```shell
+pip install sphinx==5.1.1 pre-commit recommonmark
+```
+
+**Usage**
+```shell
+pre-commit run --all-files
+```
+
+## Project Links
+[Wiki](https://github.com/thevickypedia/vpn-server/wiki)
+
+[Repository](https://github.com/thevickypedia/vpn-server)
+
+[Runbook](https://thevickypedia.github.io/vpn-server/)
+
+[Package](https://pypi.org/project/vpn-server/)
+
+## License & copyright
+
+© Vignesh Rao
+
+Licensed under the [MIT License][LICENSE]
+
+[LICENSE]: https://github.com/thevickypedia/vpn-server/blob/main/LICENSE
+[API_REPO]: https://api.github.com/repos/thevickypedia/vpn-server
diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt
index a71f421..0e6d30e 100644
--- a/docs/_sources/index.rst.txt
+++ b/docs/_sources/index.rst.txt
@@ -35,7 +35,7 @@ Configuration
====
-.. autoclass:: vpn.models.config.EnvConfig(pydantic.BaseSettings)
+.. autoclass:: vpn.models.config.EnvConfig(pydantic_settings.BaseSettings)
:members:
:exclude-members: _abc_impl, model_config, model_fields
diff --git a/docs/index.html b/docs/index.html
index d0ccbd5..46126ae 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -65,17 +65,65 @@ Welcome to VPN Server’s documentation!
VPN Server¶
VPNServer
object to spin up an EC2 instance with a pre-configured AMI which serves as a VPN server.>>> VPNServer
boto3
module.
+
+
vpn_username
- Username to access VPN client.vpn_password
- Password to access VPN client.vpn_port
- Port number for OpenVPN web interface access.aws_profile_name
- Name of the AWS profile to initiate a session.aws_access_key
- Access token for AWS account.aws_secret_key
- Secret ID for AWS account.aws_region_name
- Region where the instance should live. Defaults to AWS profile default.image_id
- AMI ID using which the instance should be created.instance_type
- Instance type to use in AWS to host the OpenVPN Access Server.key_pair
- Name of the key pair for the ec2 and the file stored for SSH connection.security_group
- Name of the security group to be created in AWS.vpn_info
- Name of the JSON file to dump the instance and connection information.domain
- Domain name for the hosted zone.hosted_zone
- Name of the hosted zone in route53.subdomain
- Name of the subdomain to be created in the hosted zone.logger
- Bring your own logger.
+
+
+
+example.com
and want the entrypoint to bevpn.example.com
then,
+
+
+
+hosted_zone
should be example.com
subdomain
should be vpn
+
+
Welcome to VPN Server’s documentation!
Welcome to VPN Server’s documentation!KeyPair of type
RSA
stored as a PEM
file to use with OpenSSH
.
Boolean flag to indicate the calling function if a KeyPair
was created.
Flag to indicate the calling function, if a KeyPair
was created successfully.
bool
@@ -169,7 +217,7 @@Boolean flag to indicate the calling function if the KeyPair was deleted successfully.
+Flag to indicate the calling function, if the KeyPair was deleted successfully.
bool
@@ -186,7 +234,7 @@security_group_id – Takes the SecurityGroup ID as an argument.
Boolean flag to indicate the calling function whether the SecurityGroup was deleted.
+Flag to indicate the calling function, whether the SecurityGroup was deleted successfully.
bool
@@ -196,7 +244,7 @@Disassociates an SG from the ec2 instance by assigning it to the default security group.
Boolean flag to indicate the calling function whether the disassociation was successful.
+Flag to indicate the calling function, whether the instance was disassociated from the SG successfully.
bool
@@ -235,14 +283,14 @@start – Boolean flag to indicate if its startup or shutdown.
+start – Flag to indicate if its startup or shutdown.
Terminates the requested instance.
Boolean flag to indicate the calling function whether the instance was terminated.
+Flag to indicate the calling function, whether the instance was terminated successfully.
bool
@@ -282,7 +330,7 @@Tests GET
and SSH
connections on the existing server.
See also
Called when a startup request is made but info file and pem file are present already.
Called when a manual test request is made.
Testing SSH connection will also run updates on the VM.
GET request against the public IP of the ec2 instance.
GET request against the public DNS of the ec2 instance.
SSH connection with the OpenVPN Access Server.
Test openvpnas
service availability on the server.
True
if the existing connection is reachable and ssh
to the origin succeeds.
False
if the connection fails or unable to ssh
to the origin.
AssertionError –
When any of the tests fail. –
bool
Env configuration.
>>> EnvConfig
>>> ImageFactory
Instantiates the ImageFactory
object.
Creates ec2 and ssm client using an existing boto3 session.
Changes a record set within an existing hosted zone.
ChangeSet response from AWS.
+Flag to indicate the calling function, whether the record was modified successfully.
Union[Dict, None]
+bool
Flag to indicate whether the interactive session has completed successfully.
+Flag to indicate the calling function, whether the interactive session has completed successfully.
bool
@@ -663,7 +708,7 @@Check status of the service running on remote server.
Returns a boolean flag if test was successful.
-bool
-