Azure Cosmos DB Emulator and Storage Emulator

Azurite emulator provides a free local environment for testing your Azure blob, queue storage, and table storage applications. Find more details in https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=docker-hub

Cosmosdb emulator provides a local environment that emulates the Azure Cosmos DB service for development purposes. Using the Azure Cosmos DB Emulator, you can develop and test your application locally. You can develop applications using Azure Cosmos DB Emulator with the SQLCassandraMongoDBGremlin/Graph, and Table API accounts. Currently the data explorer in the emulator fully supports viewing SQL data only; the data created using MongoDB, Gremlin/Graph and Cassandra client applications it is not viewable at this time. 

Creating docker-compose.yml file

version: '3.4'

services:
  cosmosdb:
    container_name: cosmosdb
    image: "mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator"
    tty: true
    restart: always
    mem_limit: 3g
    cpu_count: 2
    environment:
      - AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10
      - AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true
      - AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE=${HOST_IP}
    ports:
        - "8081:8081"
        - "10251:10251"
        - "10252:10252"
        - "10253:10253"
        - "10254:10254"
    volumes:
        - vol_cosmos:/data/db

  azurite:
    container_name: azurite
    image: "mcr.microsoft.com/azure-storage/azurite"
    restart: always
    ports:
        - "10000:10000"
        - "10001:10001"
        - "10002:10002"
    volumes:
        - vol_cosmos:/data

volumes:
  vol_cosmos:
Continue reading

How to install AWS CLI with Homebrew

Installing

Run the following code to install Homebrew if you don't have in your machine.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Verifying

Run the following code to verify Homebrew is installed

$ brew --version

Homebrew 3.2.6
Homebrew/homebrew-core (git revision c4d5aac8ec; last commit 2021-08-07)
Homebrew/homebrew-cask (git revision 1169dcb641; last commit 2021-08-07)

AWS CLI

AWS CLI, or Amazon Web Services Command Line Interface, is a unified tool that allows you to manage and interact with AWS services from the command line. It provides direct access to public APIs for AWS services. You can use the AWS CLI for a wide range of functions, from launching and controlling EC2 instances, to creating S3 buckets, and more.

Like Azure CLI, the AWS CLI is also cross-platform and supports Windows, macOS, and Linux. It's often used for scripting and automation tasks, making it a valuable tool for system administrators and DevOps professionals.

AWS CLI Usage Pattern

$ aws [service] [operation] [parameters]

Example – to list all S3 buckets

$ aws s3 ls

Installing

$ brew update && brew install awscli

Verifying

$ aws --version

aws-cli/2.2.27 Python/3.9.6 Darwin/20.6.0 source/x86_64 prompt/off

Upgrading

$ brew upgrade awscli

Uninstalling

$ brew uninstall awscli

Using AWS CLI

Create default profile

$ aws configure

AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: aJwerXUtnFEMI/K7MDENG/EXAMPLEKEY
Default region name [None]: eu-west-2
Default output format [None]: json

Create Named Profiles

$ aws configure --profile kenan-dev

AWS Access Key ID [None]: KAKAI44Q33DHBEXAMPLE
AWS Secret Access Key [None]: qwertGbClwBF/2Zp9Utk/EXAMPLEKEY
Default region name [None]: eu-west-2
Default output format [None]: json

List AWS Profiles

$ aws configure list-profiles

List AWS Configuration Data

$ aws configure list
$ aws configure list --profile kenan-dev

Set any credential or configuration settings

$ aws configure set aws_access_key_id bar --profile default
$ aws configure set aws_secret_access_key foo --profile kenan-dev

Get any credential or configuration settings

$ aws configure get aws_access_key_id --profile default
$ aws configure get region --profile kenan-dev

AWS SAM CLI

The AWS SAM(Serverless Application Model) CLI is a command-line tool that makes it easier for developers to create, deploy, and test serverless applications using AWS.

With AWS SAM CLI, you can define serverless applications that use several other AWS resources, not just AWS Lambda functions. Here are some examples:

  • API Gateway: You can define APIs in your SAM template that AWS will create using Amazon API Gateway.
  • DynamoDB Tables: You can define DynamoDB tables in your SAM template.
  • S3 Buckets: You can define Amazon S3 buckets in your SAM template.
  • EventBridge Events: You can define EventBridge events in your SAM template.
  • Step Functions: You can define state machines in your SAM template that AWS will create using AWS Step Functions.
  • SNS Topics, SQS Queues: You can define Simple Notification Service (SNS) topics and Simple Queue Service (SQS) queues in your SAM template, and much more.

Additionally, AWS SAM CLI helps in building, packaging, deploying, and testing serverless applications defined by SAM templates. It supports step-through debugging of your serverless applications, tailing logs of Lambda functions, generating sample payloads for various event sources, and validating SAM templates, amongst other things.

So, while AWS Lambda functions are a key component of many serverless applications, AWS SAM CLI offer a broader range of capabilities for defining, developing, and managing serverless applications on AWS.

Find more details about installation in https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html

Installing

$ brew tap aws/tap
$ brew install aws-sam-cli

Verifying

$ sam --version

SAM CLI, version 1.27.2

Upgrading

$ brew upgrade aws-sam-cli

Uninstalling

$ brew uninstall aws-sam-cli

IBM Cloud – API Connect

Actually, I struggled very very much to understand how API Connect service works. Because, I couldn't find a good documentation in IBM official site. So, I hope that someone who needs to understand may benefit from this article. I think that writing too much about API Connect UI is not very helpful. That is to say, Pictures sometimes may say many things clearly. So, you will see many screenshots with simple descriptions. 😉

First view of IBM Cloud UI

Continue reading