Skip to main content

Posts

Showing posts from June, 2020

Installing up HomeBrew, NPM and Node.js

Installing HomeBrew Paste and run following on MacOS terminal or Linux shell prompt /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh )" Installation NPM and Node.js Installing Node.js® and NPM is pretty straightforward using Homebrew. Homebrew handles downloading, unpacking and installing Node and NPM on your system. The whole process (after you have Homebrew installed) should only take you a few minutes. Installation Steps Open the Terminal app  and type  brew update . This updates Homebrew with a list of the latest version of Node. **Type  brew install node . Sit back and wait.  Homebrew has to download some files and install them. But that's it. Test it! Make sure you have Node and NPM installed by running simple commands to see what version of each is installed: Test Node.  To see if Node is installed, type  node -v  in Terminal. This should print the version number so you'll see something like this  v0.10.31 . Test N...

DSLR Camera Exposure setting for solar eclipse

-- Deepesh Rajpal | c: 98282.38079 | rajpal.deepesh@gmail.com

Automatically run bash script with every restart of AWS EC2 instance

We will be using User Data script to define our autorun script, which we intend to execute on every reboot or launch of our EC2 instance. I will be using this script to mount my elastic file system drive (EFS) and start to do application server configuration every time my server is rebooted and auto-scale using my autoscaling configuration. To start here's little into of user data script. By default, user data scripts and cloud-init directives run only during the first boot cycle when an EC2 instance is launched. However, you can configure your user data script and cloud-init directives with a mime multi-part file. A mime multi-part file allows your script to override how frequently user data is executed in the cloud-init package. Then, the file executes the user script. For more information on mime multi-part files, see  Mime Multi Part Archive  on the cloud-init website. Example of User Data script:  Content-Type: multipart/mixed;...

EFS file mounting and startup script for EC2 linux instance

Put a script containing the command in your /etc directory. Create a script such as "startup.sh" using your favorite text editor. vi mystartup.sh # Mounting file system sudo mkdir efs sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport <efs_ip_here>:/ efs # Asking it to wait for 30 seconds before starting the server sleep 30 # Starting the tomcat server sudo /home/ec2-user/efs/Tomcat/bin/startup.sh Save the file in your /etc/init.d/ directory. sudo mv mystartup.sh /etc/init.d/ Change the permissions of the script (to make it executable) by typing  "chmod +x /etc/init.d/mystartup.sh". -- Deepesh Rajpal | c: 98282.38079 | rajpal.deepesh@gmail.com

Simple steps for starting with AWS

   Simple and Easy! Starting with AWS Free Tier Account     S      S           Scale Securely Adding a payment method to your AWS Account helps prevent fraud and keep your data safe.     Launch Unrestricted Accounts covered under the AWS Free Tier aren't restricted in what they can launch.     Transition Seamlessly ...

Improving Rest API Performance Using Cloudfront

With one of the clients from the healthcare industry, we were facing slow API response time causing bad user experience. Client technology integrates solving the lack of healthcare interoperability with its patient-centered mobile platform, from where patients can engage, communicate and participate in their healthcare across various providers that might be using different PM/EHR/EMR products. The product includes a SaaS platform for healthcare providers to share and communicate patient health information along with its cutting edge point-of-service patient check-in app for waiting rooms. Due to the complex nature of the product, one of the requirements of the product team was to solve this issue without changing a lot of existing code. The client had already evaluated a couple of paid tools that were working great but very costly, so another challenge was to find an open-source tool that can serve the purpose. Hence, we had a two-pronged challenge- Improve performance and reduce cost...

Serving a Static Site Over HTTPS Using S3, CloudFront, and GoDaddy

I want to create and host a HTTPS secure static website using AWS S3 bucket, Cloudfront, and Godaddy.  If you are looking for options on hosting that is cost-effective, can scale just in case your site goes viral and is fairly easy to maintain?  and  It's important to host your websites and web apps with HTTPS enabled. here a right architecture for you to host. We will be using AWS S3 for hosting our static website content (will post a separate blog, how to host an Angular application). AWS CloudFront for faster distribution, using AWS certificate manager and finally we will be using our DNS service from Godaddy. (I could have used AWS Route53 but why to pay that extra 50 bucks).  **imp. - because of GoDaddy only allows CNAME for subdomains;  we will do cloudfront distribution for www.myexample.com, and use domain forwarding from myexample.com to www.myexample.com 1. Setup S3 bucket and upload your website content to your bucket.  Just re...