Skip to content

Commit

Permalink
Merge pull request #8 from chnacib/feat/patch-1
Browse files Browse the repository at this point in the history
Add Docs and CLI Reference
  • Loading branch information
chnacib authored Jan 16, 2024
2 parents 752aaa7 + b276e48 commit 9b43a06
Show file tree
Hide file tree
Showing 2 changed files with 147 additions and 4 deletions.
148 changes: 147 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,147 @@
# nami
# Nami - Orchestrate AWS ECS with kubectl-like Commands


Nami is a command-line tool that simplifies the orchestration of AWS ECS (Elastic Container Service) using commands similar to kubectl, making it easier for developers and DevOps teams to manage containerized applications on AWS. With Nami, you can seamlessly deploy, scale, and manage containerized workloads on ECS, leveraging familiar commands and workflows.

## Features
kubectl-like Commands: Nami adopts a syntax similar to kubectl, providing a familiar experience for users already familiar with Kubernetes.

AWS ECS Integration: Interact with AWS ECS using Nami commands, simplifying the deployment and management of containerized applications.

Scale Applications: Scale your ECS services up or down with a simple command, adjusting resources based on demand.

## In progress

AWS Proton Integration: Easily deploy and manage containerized workloads on ECS, including tasks, services, and clusters.

Configuration Management: support for configuration files and templates to deploy ECS services as Cloudformation stack.

## Installing


```
git clone https://github.com/chnacib/nami.git
cd nami
go build
mv nami /usr/bin
nami version
```

## Command Line Reference

### List available commands.

```
nami -h
```
```
nami --help
```

#### List clusters

```
nami get clusters
```

#### List services

```
nami get service -c [cluster]
```

#### List Tasks

```
nami get task [service] -c [cluster]
```


#### List Task definition

```
nami get taskdefinition
```

#### List Task definition revisions

```
nami get revision [taskdefinition]
```

#### List autoscaling

```
nami get autoscaling -c [cluster]
```

#### Describe cluster

```
nami describe cluster [cluster]
```

#### Describe service

```
nami describe service [service] -c [cluster]
```

#### Describe task

```
nami describe task [task] -c [cluster]
```

#### Describe task definition

```
nami describe taskdefinition [taskdefinition]
```


#### Set autoscaling configuration

```
nami set autoscale [service] --cpu 40 --mem 30 --request 500 --min 1 --max 10 -c [cluster]
```

#### Set service desired count

```
nami set replicas [service] -d 5 -c [cluster]
```

#### Update service revision

```
nami set revision [service] -r 78 -c [cluster]
```

#### Container exec interactive command

```
nami exec [task] -c [cluster] [command]
```

#### Retrieve container logs

```
nami logs task [task] -c [cluster] --limit 500
```

```
nami logs service [service] -c [cluster] --limit 500
```

## Getting Started










3 changes: 0 additions & 3 deletions pkg/ecs/autoscaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,10 @@ func registerScalableTarget(clusterName, serviceName string, minCapacity, maxCap

client_ecs := ecs.New(sess)

// Create an AWS Application Auto Scaling client
client := applicationautoscaling.NewFromConfig(cfg)

// Specify the resource ID of the scalable target
resourceID := fmt.Sprintf("service/%s/%s", clusterName, serviceName)

// Set the parameters for the scalable target registration
input := &applicationautoscaling.RegisterScalableTargetInput{
ServiceNamespace: types.ServiceNamespaceEcs,
ResourceId: &resourceID,
Expand Down

0 comments on commit 9b43a06

Please sign in to comment.