Skip to main content

No project description provided

Project description

Jupyter Deploy Terraform AWS EC2 Ngrok

This package provides a Terraform preset for deploying a Jupyter Server on AWS EC2 using ngrok for TLS.

Description

This terraform project creates an AWS EC2 instance in the default VPC that connects to ngrok for TLS.

The instance is configured so that you can access it using AWS SSM.

This project:

  • places the instance in the first subnet of the default VPC
  • select the latest AL 2023 AMI for x86_64 architecture
  • sets up an IAM role to enable SSM access
  • passes on the root volume of the AMI
  • adds an EBS volume which will mount on the Jupyter Server container
  • creates an SSM instance-startup script, which references 3 files:
    • cloudinit.sh for the basic setup of the instance
    • docker-compose.yml for the docker services to run in the instance
    • docker-startup.sh to run the docker-compose up cmd and post docker-start instructions
  • creates an SSM association, which runs the startup script on the instance

Installation

From the root of this package, run:

pip install -e jupyter-deploy-tf-aws-ec2-ngrok

Usage

This package is used by jupyter-deploy. Once installed, the template will be automatically available for use via the jupyter-deploy CLI.

jupyter-deploy terraform generate --provider aws --infra ec2 --template tls-via-ngrok

Requirements

Name Version
terraform >= 1.0
aws >= 4.66

Resources

Name Type
aws_security_group resource
aws_instance resource
aws_iam_role resource
aws_iam_role_policy_attachment resource
aws_iam_instance_profile resource
aws_ebs_volume.jupyter_data resource
aws_volume_attachment resource
aws_ssm_document resource
aws_ssm_association resource

Inputs

Name Type Default Description
aws_region string null AWS region where the resources should be created
instance_type string t3.micro The type of instance to start
key_name string null The name of key pair
ami_id string null The ID of the AMI to use for the instance
jupyter_data_volume_size number 30 The size in GB of the EBS volume the Jupyter Server has access to
jupyter_data_volume_type string gp3 The type of EBS volume the Jupyter Server will has access to
iam_role_prefix string JD-TlsViaNgrok-Exec The prefix for the name of the IAM role for the instance
custom_tags map(string) {} The custom tags to add to all the resources
cloudinit.sh file - bash script to install packages, mount volumes and setup permissions
docker-compose.yml file docker compose file to start the docker services
docker-startup.sh file bash script to run docker-compose and post docker-start instructions

Outputs

Name Description
aws_instance.id The ID of the EC2 instance

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_deploy_tf_aws_ec2_ngrok_test-0.1.0a1.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file jupyter_deploy_tf_aws_ec2_ngrok_test-0.1.0a1.tar.gz.

File metadata

File hashes

Hashes for jupyter_deploy_tf_aws_ec2_ngrok_test-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 69331fc3052bb6effd24e790b1077e6c7e498023fd2b29a20e55d7d1e436a538
MD5 4a44e9ddbc0f4dd4a88a4adbf45a5035
BLAKE2b-256 1f9df734ff117031f91f4b3588c6d3fec3b28d8205ff4cfee0ed669ba85b92d0

See more details on using hashes here.

File details

Details for the file jupyter_deploy_tf_aws_ec2_ngrok_test-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_deploy_tf_aws_ec2_ngrok_test-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f6d73cf36bfb1245569d338cdcc65e5d0992581515737dc2359bd496064c980
MD5 df0f1e9296dbdc2e11eeb22ac51712ed
BLAKE2b-256 3538be72bb535fef7aca1235d1d96cf45e605f019568dfdb45ba9e664b906bc0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page