Wednesday, June 22, 2022

Heroku Reviews - June 22, 22

 



WHAT


Deploy full stack apps (FE + BE + DB)

Deploy full stack apps without the need of all the technical skills needed for AWS

Prototyping - quick deployment

Build an entire pipeline (dev, test and prod)

Ship web apps without a lot of effort

Build app very quickly

Build, deploy and run your app very easily

Very helpful to build highly large data apps

Easy to deploy full stack applications fast without worrying about configuring


HOW


Connect your app using a Git repo and it will handle the deployment


USE


Simple and intuitive interface

Simple and easy to use, even for users with minimal knowledge of application architecture


EASY


Easy to setup

You can set up an entire environment very fast


DEPLOYMENT SPEED


Instant deployment

One-step deployment process

Their auto-maintenance and auto-deploy services saves a lot of time and effort


DEPLOYMENT EASE


Makes it easy to deploy apps without having the knowledge of managing a server

CLI tool - easy to deploy

Quick and easy deployment


INTEGRATIONS


Seamless integration with Git

Ease with which we can deliver updated code and new features

Add ons

Marketplace

Easy installation of plugins and add-ons

Integrate third-party website with Salesforce

Connect database with a single click with the help of plug in



LEARNING CURVE


Less to learn for developers


COMPLEXITY


Complexity < (AWS or GCP)


SCALING


Scales with you

Autoscale based on usage

Autoscale our platform


TOOLS


Migration tool

Powerful metrics to monitor the app


ZERO DOWNTIME


No downtime

Rolling restarts (to fix delays in requests during deploy)

Perform a rollback to a previous version with just one click


TIME SAVINGS


Saves a lot of time in creating and deploying new apps


COST SAVINGS


Streamline the process for developers and saves costs on app development

Reduced the dependence small teams have on Devops (saves costs)


DOCUMENTATION


for:

  using several environments

  tuning memory usage

  deploying from Dropbox

Detailed sample apps and code for starting a new app


SECURITY


Secure and protected ecosystem



Dev / Prod Environment Parity


Being able to switch from local to remote environment

You can work locally with remote database


WHO


Great for small teams and if you need to validate your product

Single developer or small teams can focus on the project and get it launched, without too much hassle








CONS


Once you get substantial traffic, you have to ask yourself whether your budget should focus on:


more dynos

code optimization

different platform


Support

Contract trap

License cose

Expensive

Gets expensive quickly

Non traditional server environment

Deploy fixed number of apps

Apps go to sleep if there is no user activity

Environment configuration setup is slightly complex (vs Netlify)

CI service is fairly limited (works fine with CircleCI & Travis)

Minimal language support

Low network performance

Upsell on features you may not need

To the uneducated, they will opt into unnecessary features that are otherwise free

Security add-ons like AWS would be nice

Need a separate service for repo like Github, rather than having everything inclusive

30 seconds restriction (not compatible with OS libraries)

Request gets stuck behind slow request

Hard to gauge the capacity needed

Hit by downtimes (not much to do once it goes down)

If AWS goes down Heroku will go down


SSH Basics

 We learned a little bit about the SSH protocol and how to use the ssh program to connect to a remote server.

SSH protocol was introduced for secure communication using the pub- lic key encryption on the network. OpenSSH is a collection of programs implementing this protocol and available to us.

Connecting to a remote server can be as easy as running ssh $USER@$HOST. In the case we create a server with password authentication, we can use ssh-copy-id to put the public key to the server and take advantage of SSH-keys only access.

We learned about SSH keys management. We can find our keys in ~/.ssh, generate new ones with ssh-keygen. We explored how ~/.ssh/authorized_keys is used for authorizing access using these keys and how SSH host keys are stored in ~/.ssh/known_hosts.

scp and sftp are the go-to tools for secure file transfer over SSH. Although using scp has some security implications given its original design, it’s safe to use in simple commands. rsync is another popular option.

Monday, June 13, 2022

Create a Node on VPS

  1. Signup for VPS provider such as Linode
  2. Create a node














Provisioning, Booting, Running


12 Factor App

 Heroku, with its 12-factor application model, has changed the way we think about building, deploying, and hosting web applications. 

The rise of containers, phoenix servers and continuous delivery has seen a move away from the usual approach to deploying web applications. Traditionally we have built an artifact and then installed that artifact into an application server. The result was long feedback loops for changes, increased build times and the not insignificant overhead of managing these application servers in production. Many of them are a pain to automate too. Most teams we work with favor bundling an embedded http server within your web application. There are plenty of options available: Jetty, SimpleWeb, Webbit and Owin Self-Host amongst others. Easier automation, easier deployment and a reduction in the amount of infrastructure you have to manage lead us to recommend embedded servers over application servers for future projects.

Cloud Native Apps

https://dev.to/syncsynchalt/safe-http3-experimentation-with-caddy-447f

https://requestmetrics.com/web-performance/http3-is-fast




Thursday, June 09, 2022

My notes

 

Secure Connection


  1. Establish secure connection from the workstation to the servers.
  2. Run deployment tasks
  3. Upload configuration files
  4. Log in
  5. Put the public key on the server
  6. Create a secure connection using the private key
  7. Avoid password based authentication
  8. Use SSH tunneling to reuse the connection for other services

SSH Keys


Setup passwordless login on the server

  • Use ssh-keygen to make a new pair of SSH keys
  • Create a virtual private server in the admin panel
  • Copy the SSH keys using ssh-copy-id utility for providers that setup password-based authentication

Success Criteria

Login using SSH as root

ssh root@server-hostname-or-ip-address

Remote Shell

  • Install ssh-agent on Mac OS
  • Connect to server from the client, use ssh command
  • Define USER environment variable to specify hte user on the host
  • Define HOST environment variable to specify the remote server's hostname or IP address
  • The default configuration file used is ~/.ssh/config
  • The default identity file (private key) is ~/.ssh/id_rsa
  • The identity_file, login_name and port values can be specified per host in the configuration file (~/.ssh/config)

File Transfers


Steps

  1. Signup for hosting provider
  2. Create a node
  3. Provision a node
  4. Deploy code
  5. Maintain node

  • Figure out which steps are done by the customer and which steps are done by the product.
  • Establish secure

Wednesday, June 08, 2022

MVP

 
















June 6, 2022 Tasks

Completed Tasks

  1. Deploy static blog for generating leads: https://www.deploygrid.live/
  2. Create the landing page and update the site: https://apigrid.dev/

Pending Tasks

  1. Create a demo of the product and ask for payment
  2. Search "company name sucks" to find the tradeoffs
  3. Breakdown the problem: What is the flow? Find the core problem.
  4. Solve one CORE problem
  5. Ask why five times and note down the answer for each why. 
  6. Write an article and promote based on the answers for 8
Practice building solutions. Build something in the chosen space. Product discovery is parallel to building a prototype.
  1. Build it fast
  2. Ship it
  3. Test the idea
  4. Tweak the initial idea

Tuesday, June 07, 2022

Deploy Grid Articles

  1. Brewfile
  2. DeMorgan's Law
  3. Jekyll + Tailwind
  4. Customizing DateTime format
  5. Cohesion
  6. Coupling
  7. 12 Factor Apps
  8. Naming methods by looking at Jira ticket description
  9. Avoid try and using the safe navigation operator
  10. Upgrading Puma, managing technical risk
  11. Procfile
  12. Foreman
  13. Install syntax highlighter in Jekyll
  14. Falcon server 
  15. Using constants and moving all related constants to one file
  16. JSON Schema validator for request and response validation
  17. Breaking complex conditional into simpler methods to make the code expressive
  18. Traceability from requirements to code to database (all layers)
  19. Deploying the ToDo apps for different stacks (available as open source) using the deployment tool

Monday, June 06, 2022

The onegrid.run Commands

Grid CLI Commands

Initialize a project and setup SSH keys
grid init

Create your first node
grid create node-name

View the current status of your node
grid status

View the health status of all the servers in your node
grid health

Push the source code to the node
grid deploy

Run any unix command on the production instance and view the output
grid run <unix command>
Example:
Show all the environment variables and their values
grid run ENV

Go to rails production console in sandbox mode:
grid console



Compass

Who are the other players delivering the same functions?

Which player will win the inevitably win the IFR game in the long term?

What implications does this have on the business we are thinking of starting?