forked from blinksh/blink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Created AWS document * Created Digital Ocean document * Updated content to match copied version * Created Digital Ocean document * Fixed typos * Finished Digital Ocean's docs * Finished Cloud Provider's docs * Final change * Deleted document
- Loading branch information
1 parent
06b9ee1
commit c956da9
Showing
5 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Connecting to your AWS EC2 Instance with Blink | ||
|
||
## Introduction | ||
|
||
We could make a convincing argument that Amazon popularised, if not invented, the cloud computing movement. By offering servers, storage and other computing services, priced by the hour and accessible via an API, Amazon started a new phase in Internet computing. In just fifteen years, Amazon has gone from ma pie-in-the-sky idea by visionaries at the company to a large public utility that powers a substantial portion of the Internet. | ||
|
||
[EC2](https://aws.amazon.com/ec2/), or **E**lastic **C**ompute **C**loud, is the virtual server offering of AWS. Customers can launch a wide variety of Linux and Windows instances with EC2, each running a full copy of the operating system backed by Amazon's highly reliable infrastructure. EC2 instances operate much like regular servers, except resources like CPU and memory can be changed with a simple reboot. Disks for the instances are powered by [EBS](https://aws.amazon.com/ebs/?ebs-whats-new.sort-by=item.additionalFields.postDateTime&ebs-whats-new.sort-order=desc) (**E**lastic **B**lock **S**torage), a technology that allows easy disk management. Volumes can be resized and scaled with a click of the mouse. | ||
|
||
Let's guide you through the process of launching a Linux EC2 instance in the AWS cloud and connecting to it with Blink. | ||
|
||
## Creating an Instance | ||
|
||
Sign in to your AWS account, then check in the top right corner on the menu bar between your account's name and support to ensure you're in the right datacenter region. You're free to use any datacenter in the world, but it's best to select the location that's closest to your customers or you for reduced latency. | ||
|
||
Once you've selected the most appropriate region, click on the Services menu at the top, then pick EC2 under Compute to bring up the EC2 dashboard. You might have to type EC2 in the search box for the link to be visible. | ||
|
||
Click on instances under the Instances group on the left-hand menu to see a full list of your instances. On a new account, you won't find any. Click Launch Instance, then select your [AMI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) (Amazon Machine Image) which is simply a disk image that contains an operating system. In the Quick Start section, you'll find a list of common available systems, like RedHat Enterprise Linux, SUSE Linux, Amazon Linux, Microsoft Windows Server and Ubuntu. Since we're connecting to a Linux Server, let's choose Ubuntu. | ||
|
||
On the next page, you can select the instance type. For testing and development purposes, the [t2](https://aws.amazon.com/ec2/instance-types/t2/) and [t3](https://aws.amazon.com/ec2/instance-types/t3/) are generally adequate. Consult the CPU and Memory specifications for each size to make sure it fits your requirements. Once you've made your selection click next to Configure Instance Details. The defaults on this page are likely fine, but you now have the opportunity to make changes to your default configuration. When finished click next to bring Add Storage menu. | ||
|
||
Now it's time to pick the size, in gigabytes, of the root drive for your instance. For testing purposes the default size, usually 8 GiB, is fine. You can resize later if needed. Then click next, Tags. If you wish to label this instante for a particular project or customer, you can add a name/value pair calle da tag. It's recommended to create a tag called `Name` and give it the value of the intended hostname. Once you've finished click next: Configure Security Group. | ||
|
||
If this is a new account or you don't have an existing infrastructure at AWS, you will be prompted to create a new security group. Assign it a meaningful name, then add any open ports you will need. At a minimum you'll need SSH (port `22`) open to your IP. Alternatively, if you want to use Mosh you'll need to allow UDP traffic on ports `60000` to `61000`. | ||
|
||
To open a port, select the type of port (i.e. SSH, HTTP, HTTPS...) or if none matches pick a custom TCP or UDP port and add the number of range of ports in the Port Range box. The destination can be set to anywhere if you wish the port to be open to all IP addresses, or set to a custom IP or My IP, a shortcut provided to automatically fill in your current IP address. Note that IP addresses must be entered in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) format (i.e. `1.2.3.4/32`) for a specific IP, and `1.2.3.0/24` for a Class C range). Once you've whitelisted any ports and IP addresses, click Review and Launch. | ||
|
||
You'll now see a detailed list confirming all of your selected options for the new instance. If everything's okay click Launch. After that, you can generate a new public/private key pair or choose an existing pair previously imported into AWS. If you create a new one you'll be prompted to save the private key file. You must have this file to connect to your instance, so you'll want to keep it safe. We will explore how to import an Amazon generated private key inside Blink. | ||
|
||
The instance will launch once you confirm the SSH key. Within minutes you'll be able to use your new EC2 instance. | ||
|
||
## Importing an Amazon Private Key | ||
|
||
Importing keys into Blink Shell is as easy at it gets. Open the settings panel by either typing `config` in the shell or by pressing `Cmd + ,` if you have a keyboard attached. Select the Keys menu and press add (`+`) to import it using the assistant using the option that best suits you. For example you can copy it to your clipboard and then pase it into the assistant. | ||
|
||
Remember that if you name your key a non-default name, `id_rsa`, you'll have to add the `-i <keyname>` flag to the SSH command. | ||
|
||
<p align="center" > | ||
<img src="aws/aws-image1.png" width="40%" alt="img"/> | ||
</p> | ||
|
||
## Accessing Your Instance | ||
|
||
Click on Instances under the Instances group on the left-hand side menu, then select the instance you wish yo connect to with Blink. Right-click on the instance, then click Connect. The resulting page will show the SSH commands to use. If your key has already been added to Blink, you can use the same SSH connection command to connect, like this: | ||
|
||
```bash | ||
ssh ubuntu@IP_ADDRESS | ||
``` | ||
|
||
In the above example replace IP with the address of your EC2 instance. If you choose an Amazon Linux AMI, you'll want to change the user `ubuntu` with `ec2-user`. | ||
|
||
## Conclusion | ||
|
||
AWS powers a large portion of the Internet, so launching an EC2 instance inside Amazon's powerful cloud puts your server in good company with leading web brands. Blink's flexible command-line tools, including SSH, mosh and Rsync make managing your Amazon cloud server a breeze. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Connecting to your Digital Ocean Droplet with Blink Shell | ||
|
||
## Introduction | ||
|
||
[Digital Ocean](https://www.digitalocean.com) is a prominent cloud service provider that offers an inexpensive yet performant cloud server solutions. While Amazon Web Services focuses on a wide array of smaller IT components that can work together to form a virtual infrastructure, Digital Ocean takes a more traditional approach. | ||
|
||
Droplets are Digital Ocean's name for servers. They have fixed disk space, bandwidth and networking resources. This allows for a more straightforward onboarding experience. Unlike traditional providers, services are billed by the minute, creating a hybrid cloud solution that works well for many production configurations, including testing and development environments. | ||
|
||
Let's take a deep dive under and see how to launch a Droplet and connect to it using Blink. | ||
|
||
## Creating a Droplet | ||
|
||
Sign in to your Digital Ocean account and then click *Create* at the top right corner of the page and finally pick Droplet. You can also create a Droplet from the Droplets page found on the left-hand side menu. Pick your desired Linux distribution, version and server plan. Don't worry too much about the Droplet's size as you can resize it afterwards if your needs change. | ||
|
||
<p align="center" > | ||
<img src="do/do-image1.png" width="60%" alt="img"/> | ||
</p> | ||
|
||
|
||
The next option to pick is the datacenter location. By selecting the closest location to you or where your final client will be you will get overall lower latencies. This helps improve the resulting user experience you're gonna deliver. Next, you're given the opportunity to select additional networking options, then you'll be prompted for credentials. You can click *New SSH key* and then add your public key so you can easily connect to your Droplet via SSH or choose password authentication. Please be aware that password authentication method is less secure. | ||
|
||
In just a few minutes, your Droplet will become part of Digital Ocean's vas sea of servers - ready to go to work for you! | ||
|
||
## Accessing your Droplet | ||
|
||
Click on the *Droplets* item in the left-hand side menu to see a list of your running servers. Copy the IP address from the server and either enter it into a pre-defined host entry in Blink or use SSH on the Blink Shell to connect. | ||
|
||
```bash | ||
ssh root@IP_ADDRESS | ||
``` | ||
|
||
Replacing in the previous example `IP_ADDRESS` with the IP address of your droplet. | ||
|
||
## How to Configure your Droplet | ||
|
||
Digital Ocean provides a wide variety of elements to customize your droplet from. Not only you can choose from several already provided distributions but you can use your custom images and explore the marketplace for Applications that suit your needs. | ||
|
||
If you want to use Mosh, and get the most out of Blink, you can follow this [tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-mosh-on-a-vps) by Digital Ocean that guides you through the process. | ||
|
||
Under your Droplet's configuration you can start by activating IPv6 support if that's what you need, resize your CPU, disk or RAM for whatever your needs are. | ||
|
||
As you can see there are multiple options available and prices that suit your needs that Digital Ocean's servers can help you achieve what you need. | ||
|
||
## Conclusion | ||
|
||
From production servers behind load balancers to test and development servers, Digital Ocean's Droplets have you covered. Pair your Droplet with Mosh and have an always-on Linux server at your command - reachable from any device from anywhere with Internet access. | ||
|
||
In future articles, we'll explain how to set up a development environment, install VS Code remote extensions or even Jupyter Notebooks. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters