Video Tutorial: How to Install Docassemble on Amazon Web Services
Sam Harden provides step-by-step instructions to install Docassemble on Amazon Web Services. Video 1 of 3.
by Sam Harden
Published onDec 06, 2019
Video Tutorial: How to Install Docassemble on Amazon Web Services
Docassemble is a free, open-source expert system for guided interviews and document assembly, based on Python, YAML, and Markdown. Docassemble has strong implications for the potential of computational law because it is a free and straightforward tool for computing legal processes and legal functions.
This lesson provides a step-by-step walkthrough of everything required to set up Docassemble using Amazon Web Services. Follow these instructions, and you will have your very own instance of Docassemble from which you can compute the law.
Note: Steps are organized based on the software that is used to perform each step. Just in case you lose your place and have to start over, we have included a link to the specific place in the video where each step takes place.
Note: If you haven’t created an account, you will need to create an account
Note: New accounts can take up to 24 hours to activate
Pro tip: In a new session, to sign in to an existing account on www.aws.amazon.com you actually click to option to create a new account then look for sign-in with existing account under create account
The service that will be used to run Docassemble is EC2. Select services tab at the top, then select EC2 under Compute, and this will bring up EC2 dashboard (Link)
In the EC2 dashboard, you can see what resources you are using and other information about your account (Link)
To begin creating the instance for Docassemble, select Launch Instance (Link)
Amazon offers a wide variety of cloud computing configurations that you can choose from. These different configurations are referred to as instances. (Link)
Select the instance for “Amazon Linux 2 AMI (HVM, SSD Volume Type).” (Link)
Now, it is time to choose an Instance Type. Each instance has types associated with it that determine things like how much memory is available, how many vCPUs are available, pricing etc. (Link)
For different the myriad considerations of the project, such as workload, budget, etc., different instance types will be favorable over others. Here, because we will show you the most lightweight option for configuring Docassemble. Because Docassemble requires more than 1 gb of storage we will choose the “General Purpose” “t2.medium” “4 gb.” (Link)
Once you have selected the General Purpose t2.medium 4 instance type, click the white button for “Next: Configure Instance Details.” (Link)
The features on this page can be customized based on the particular needs of a user or a system. We do not need to change any of these features now in order to get Docassemble running. (Link)
The next step will be to select “Next: Add Storage.” (Link)
We are going to increase the “Size (GB)” from the default of 8 to 29. (Link)
Next: Configure Security Group. We create a new security group to determine who and what can access the EC2 instance. In order to change things in your EC2 instance, you must configure the instance so that your IP address can access this. In order to prevent unwanted people from accessing the EC2 instance, only the IP addresses that are listed will be able to access the EC2 instance. SSH, Secure Shell, is a type of connection to the EC2 instance that allows you to access it from the command line. (Link)
Note: the default IP address of 0.0.0.0/0 allows anyone anywhere to access the EC2 instance as long as they have the appropriate password.
We are going to change this to My IP address, which automatically reads your individual IP address. (Link)
Pro Tip: it is a best practice to add IP addresses for the different locations you work from (e.g., house, office, coworking spaces, etc.)
Because we want people to be able to access the external facing Docassemble content that we are producing, we need to add an additional rules. Select “Add Rule” on the left hand side of the page and we are going to add some rules. (Link)
Under type, select HTTP; Under port, select 80; Leave Source as the default IP of 0.0.0/0. This allows anyone to access the front end of your instance. (Link)
Next, we are going to add another rule. Select “Add Rule.” In the new rule, change the type to HTPPS; change the Port to 443; and leave the default IP as 0.0.0/0 (Link)
Select Review and Launch on the right hand side of the page. (Link)
Select “Launch” at the bottom of the page. This brings up a screen that says to “Select an existing key pair or create a new key pair.” A key pair is a file that allows you to access the EC2 instance through the Secure Shell (SSH), aka the administrative side. (Link)
Create a new key-pair by toggling the first drop down, name the key pair: “my-new-key-pair” and then click download key pair. (Link)
Save the key pair in a place that you will not lose it. (Link)
Note: be sure to save a backup of your key pair somewhere.
Select Launch Instance. It takes a few minutes to launch the instance. (Link)
Navigate back to the EC2 dashboard by selecting Services at the top of the page and then clicking EC2. This brings up your various instances. (Link)
Because your launching instance doesn’t have a name, go ahead and name the launching instance. Click the blank under name and type in “Bob.” (Link)
The file will now take a moment to initialize. We know the file is initialized when the “Instance State” reads “Running.” (Link)
Note: The initialization could take a few minutes - be patient
Note: Under the column named “Status Checks” the status will change from “initializing” to “running” when this operation is done and then you can proceed to the next step.
Once the file has initialized, now we need to connect to Bob, our instance. (Link)
To create a directory, type in mkdir + [name of your directory] (for example: mkdir docassemble-folder) --> then, open finder, search for [name of your directory] and copy the key pair file into the directory
Open Terminal if you are using a Mac. If you are using Windows, Linux, etc., you will use a different command line based on the operating system you are working from but the commands are approximately the same. (Link)
On a Mac, to open Terminal, just click open the Launchpad, then search for Terminal and click on the Terminal icon to open that application. In Terminal, a line will show up with the label you have given to your Laptop and the name given to your user. In this case, the name of the laptop is “Sams-MBP” and the name of the laptop is “samharden” with a dollar sign at the end. (Link)
From Terminal, type cd bob to navigate to the correct directory. (Link)
Once you have navigated to the correct directory, type ls to view the files in the directory. This will bring up “my-new-key-pair” the file that allows us to access the EC2 instance from the command line. (Link)
Note: you can only connect to the EC2 instance if while using Terminal you are in the same directory where your key pair is living; if you try it in a different folder, it will not work because AWS is looking for that key pair.
To get into the EC2 instance, type: sudo ssh -i “my-new-key-pair.pem” ec2-18-216-155-205.us-east-2.compute.amazonaws.com (Link)
Note: sudo ssh is the type of connection, -i “my-new-key-pair.pem” is the name of your key pair file, and [email protected]
Note: The prefix of ec2-user is always going to be the same. Everything after the @ sign is going to be different for each user and is based on the Public DNS (IPv4), which is located in the EC2 dashboard. You will copy and paste the Public DNS (IPv4) from your EC2 dashboard into your command line.
Note You must use the sudo command to edit the file as a Super User, otherwise you will not have the adequate permissions to edit the file, click enter to execute the command and it will bring up the command line for the instance of AWS where Docassemble will be running
In order to get Docassemble running, we must install all the dependencies into our instance of AWS. To do this, in the Command Line, type: sudo yum -y update and hit enter. (Link)
Note: this will look for updates to the operating system in AWS
Once this is complete, we will install Docker. Install Docker from the Command Line by typing, sudo yum -y install docker. (Link)
Once you have installed Docker, type sudo service docker start to make sure it is running. (Link)
Now, Docker is running in our EC2 instance and we are ready to start running Docassemble. (Link)
In the command line, type sudo docker run -d -p 80:80 -p 443:443 jhpyle/docassemble (Link)
Note: sudo indicates we are running from super user; -d means we want this to run in the background; -p indicates that we want to open the ports that we configure in the EC2 instance and the commands indicate which ports to open;jhpyle/docassembleis the docker container that we are choosing to run. A docker container is a package of software code that allows an individual to run a software on their own machine
Hit enter, this downloads Jonathan Pyle’s instance and gets it ready to run for us. There are a lot of files in this instance, so it will take a minute to download. (Link)
Now, Docassemble is running. From the command line, type sudo docker ps it shows us the running container of Docassemble. (Link)
From EC2 Dashboard, select the instance for Bob. (Link)
The public DNS address is the web address for our Docker container. Copy that and type it into the browser. (Link)
This brings up a Demonstration Interview and this means… You are now running your own instance of Docassemble in your own cloud computing instance. You can edit your guided interview so that others can access it. (Link)
Because the Demonstration Interview isn’t exactly useful in itself, and because we want to do things with Docassemble, we need to sign in and create a new account that allows us to edit the interview. (Link)
Select “Sign in or sign up to save answers.” (Link)
In every version of Docassemble, you must sign in with the default user. The email for the default user is “[email protected]" and the password is “password” next, hit enter and change your password. (Link)
Once you have changed your password, you are inside the Docassemble web application as the administrator. (Link)
Now, from the drop down menu at the top of the screen, we can change our “User Profile” to include our name and select Save. (Link)
From the drop down menu at the top of the page, select “user list”, change email address, and click Save. (Link)
Next, from the Dropdown, navigate to the Playground to edit interview that are deployed on Docassemble. (Link)
Want to learn more about what Sam Harden is up to?
If you are curious about how AI is shaping the future of work, check the website and dive into this tutorial! If you are fascinated by AI jobs of the future, this tutorial on putting Docassemble on Amazon Web Services is an extremely good place to start. Docassemble is an open-source device for guided interviews and record assembly, with robust implications for computational law. By following the step-by-step walkthrough in the video tutorial, you will have your personal occasion of Doc assembly up and jogging in no time.
As request is ascending there aren't affirmed experts on the lookout so it implies that you will be on appeal now and for your future. you will improve your profession way just as you will enter another vocation. On the off chance that you get AWS Training in Pune you will be 1 of every 30 individuals you will be on high demand.you will characterize your own remuneration after Amazon web administrations certificate. This is the opportunity to ensured AWS Amazon web Services.