Skip to content

Commit 8b9d8e4

Browse files
committed
added support of digitalocean
1 parent 7d73c8a commit 8b9d8e4

File tree

109 files changed

+10187
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+10187
-15
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ jobs:
6060
chmod +x komiser_windows_amd64.exe komiser_darwin_amd64 komiser_linux_amd64
6161
- run:
6262
name: Push Linux binary
63-
command: aws s3 cp komiser_linux_amd64 s3://komiser/2.3.0/linux/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
63+
command: aws s3 cp komiser_linux_amd64 s3://komiser/2.4.0/linux/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
6464
- run:
6565
name: Push Windows binary
66-
command: aws s3 cp komiser_windows_amd64.exe s3://komiser/2.3.0/windows/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
66+
command: aws s3 cp komiser_windows_amd64.exe s3://komiser/2.4.0/windows/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
6767
- run:
6868
name: Push Mac OS X binary
69-
command: aws s3 cp komiser_darwin_amd64 s3://komiser/2.3.0/osx/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
69+
command: aws s3 cp komiser_darwin_amd64 s3://komiser/2.4.0/osx/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
7070
- run:
7171
name: Upload IAM policy
7272
command: aws s3 cp policy.json s3://komiser/policy.json --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM alpine:3.9.4
22
MAINTAINER mlabouardy <mohamed@labouardy.com>
33

4-
ENV VERSION 2.3.0
4+
ENV VERSION 2.4.0
55
ENV PORT 3000
66
ENV DURATION 30
77

Godeps/Godeps.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ Stay under budget by uncovering hidden costs, monitoring increases in spend, and
1212

1313
**Discuss it on [Product Hunt](https://www.producthunt.com/posts/komiser) 🦄**
1414

15+
*Komiser EE is available in private beta test stage, sign in for free at [https://cloud.komiser.io](https://cloud.komiser.io)*
16+
1517
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/fold_left.svg?style=social&label=Follow%20%40Komiser)](https://twitter.com/komiseree) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Optimize%20Cost%20and%20Security%20on%20AWS&url=https://github.com/mlabouardy/komiser&via=mlabouardy&hashtags=komiser,aws,gcp,cloud,serverless,devops)
1618

1719
**Highlights**
1820

1921
* Analyze and manage cloud cost, usage, security, and governance in one place.
2022
* Control your usage and create visibility across all used services to achieve maximum cost-effectiveness.
2123
* Detect potential vulnerabilities that could put your cloud environment at risk.
22-
* Get a deep understanding of how you spend on the AWS, GCP, OVH and Azure.
24+
* Get a deep understanding of how you spend on the AWS, GCP, OVH, DigitalOcean and Azure.
2325

2426
<p align="center">
2527

@@ -37,24 +39,24 @@ Does your company use Komiser? Ask your manager or marketing team if your compa
3739

3840
## Download
3941

40-
Below are the available downloads for the latest version of Komiser (2.3.0). Please download the proper package for your operating system and architecture.
42+
Below are the available downloads for the latest version of Komiser (2.4.0). Please download the proper package for your operating system and architecture.
4143

4244
### Linux:
4345

4446
```
45-
wget https://cli.komiser.io/2.3.0/linux/komiser
47+
wget https://cli.komiser.io/2.4.0/linux/komiser
4648
```
4749

4850
### Windows:
4951

5052
```
51-
wget https://cli.komiser.io/2.3.0/windows/komiser
53+
wget https://cli.komiser.io/2.4.0/windows/komiser
5254
```
5355

5456
### Mac OS X:
5557

5658
```
57-
wget https://cli.komiser.io/2.3.0/osx/komiser
59+
wget https://cli.komiser.io/2.4.0/osx/komiser
5860
```
5961

6062
_Note_: make sure to add the execution permission to Komiser `chmod +x komiser`
@@ -67,7 +69,7 @@ brew install komiser
6769
### Docker:
6870

6971
```
70-
docker run -d -p 3000:3000 -e AWS_ACCESS_KEY_ID="" -e AWS_SECRET_ACCESS_KEY="" -e AWS_DEFAULT_REGION="" --name komiser mlabouardy/komiser:2.3.0
72+
docker run -d -p 3000:3000 -e AWS_ACCESS_KEY_ID="" -e AWS_SECRET_ACCESS_KEY="" -e AWS_DEFAULT_REGION="" --name komiser mlabouardy/komiser:2.4.0
7173
```
7274

7375
## How to use
@@ -211,6 +213,25 @@ consumer_key=my_consumer_key
211213
<img src="https://s3.eu-west-3.amazonaws.com/komiser-assets/images/dashboard-ovh.png"/>
212214
</p>
213215

216+
### DigitalOcean
217+
218+
* To generate a personal access token, log in to the [DigitalOcean Control Panel](https://cloud.digitalocean.com/).
219+
220+
* Click the **API** link in the main navigation, In the **Personal access tokens** section, click the **Generate New Token** button.
221+
222+
* Create a *ready-only* scope token. When you click **Generate Token**, your token will be generated.
223+
224+
* Set *DIGITALOCEAN_ACCESS_TOKEN* environment variable:
225+
226+
```
227+
export DIGITALOCEAN_ACCESS_TOKEN=<TOKEN>
228+
```
229+
230+
* If you point your browser to http://localhost:3000, you should be able to see your projects:
231+
232+
<p align="center">
233+
<img src="https://s3.eu-west-3.amazonaws.com/komiser-assets/images/dashboard-digitalocean.png"/>
234+
</p>
214235

215236
## Options
216237

dashboard/src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<p>Security</p>
127127
</a>
128128
</li>
129-
<li class="nav-item" routerLinkActive="active">
129+
<li class="nav-item" routerLinkActive="active" *ngIf="currentProvider.value != 'digitalocean'">
130130
<a routerLink="/data-and-ai">
131131
<i class="la la-commenting"></i>
132132
<p>Data & AI</p>

dashboard/src/app/app.component.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Component, OnDestroy } from '@angular/core';
22
import { AwsService } from './aws.service';
33
import { GcpService } from './gcp.service';
44
import { OvhService } from './ovh.service';
5+
import { DigitaloceanService } from './digitalocean.service';
56
import { StoreService } from './store.service';
67
import { not } from '@angular/compiler/src/output/output_ast';
78
import { Subscription } from 'rxjs';
@@ -36,14 +37,18 @@ export class AppComponent implements OnDestroy {
3637
{
3738
label: 'OVH',
3839
value: 'ovh'
40+
},
41+
{
42+
label: 'DigitalOcean',
43+
value: 'digitalocean'
3944
}
4045
];
4146

4247
private _storeService: StoreService;
4348

4449
private providers: Map<String, Object> = new Map<String, Object>();
4550

46-
constructor(private awsService: AwsService, private gcpService: GcpService, private storeService: StoreService, private ovhService: OvhService) {
51+
constructor(private awsService: AwsService, private gcpService: GcpService, private storeService: StoreService, private digitaloceanService: DigitaloceanService, private ovhService: OvhService) {
4752

4853
this.providers['aws'] = {
4954
label: 'Amazon Web Services',
@@ -63,6 +68,12 @@ export class AppComponent implements OnDestroy {
6368
logo: 'https://cdn.komiser.io/images/ovh.jpg'
6469
};
6570

71+
this.providers['digitalocean'] = {
72+
label: 'DigitalOcean',
73+
value: 'digitalocean',
74+
logo: 'https://cdn.komiser.io/images/digitalocean.png'
75+
};
76+
6677
//if (this.storeService.getProvider() == 'aws') {
6778
if (localStorage.getItem('profile')) {
6879
this.currentProfile = localStorage.getItem('profile');
@@ -123,7 +134,14 @@ export class AppComponent implements OnDestroy {
123134
}, err => {
124135
this.accountName = 'Username';
125136
});
126-
}else {
137+
}else if(this.currentProvider.value == 'digitalocean'){
138+
this.redAlarms = 0;
139+
this.digitaloceanService.getProfile().subscribe(data => {
140+
this.accountName = data.email.substring(0, data.email.indexOf('@'))
141+
}, err => {
142+
this.accountName = 'Username';
143+
});
144+
} else {
127145
this.redAlarms = 0;
128146

129147
this.gcpService.getProjects().subscribe(data => {

dashboard/src/app/app.module.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { DataAndAiComponent } from './data-and-ai/data-and-ai.component';
1717
import { AwsService } from './aws.service';
1818
import { GcpService } from './gcp.service';
1919
import { OvhService } from './ovh.service';
20+
import { DigitaloceanService } from './digitalocean.service';
2021
import { StoreService } from './store.service';
2122
import { PaginationModule } from 'ngx-bootstrap/pagination';
2223
import { ProfileComponent } from './profile/profile.component';
@@ -47,6 +48,11 @@ import { OvhSecurityComponent } from './security/ovh/ovh.component';
4748
import { OvhDataAndAIComponent } from './data-and-ai/ovh/ovh.component';
4849
import { OvhLimitsComponent } from './limits/ovh/ovh.component';
4950
import { OvhProfileComponent } from './profile/ovh/ovh.component';
51+
import { DigitaloceanDashboardComponent } from './dashboard/digitalocean/digitalocean.component';
52+
import { DigitaloceanComputeComponent } from './compute/digitalocean/digitalocean.component';
53+
import { DigitaloceanStorageComponent } from './storage/digitalocean/digitalocean.component';
54+
import { DigitaloceanNetworkComponent } from './network/digitalocean/digitalocean.component';
55+
import { DigitaloceanSecurityComponent } from './security/digitalocean/digitalocean.component';
5056

5157

5258

@@ -132,7 +138,12 @@ const appRoutes: Routes = [
132138
OvhSecurityComponent,
133139
OvhDataAndAIComponent,
134140
OvhLimitsComponent,
135-
OvhProfileComponent
141+
OvhProfileComponent,
142+
DigitaloceanDashboardComponent,
143+
DigitaloceanComputeComponent,
144+
DigitaloceanStorageComponent,
145+
DigitaloceanNetworkComponent,
146+
DigitaloceanSecurityComponent
136147
],
137148
imports: [
138149
RouterModule.forRoot(
@@ -147,6 +158,7 @@ const appRoutes: Routes = [
147158
],
148159
providers: [
149160
AwsService,
161+
DigitaloceanService,
150162
StoreService,
151163
GoogleAnalyticsService,
152164
GcpService,

dashboard/src/app/compute/compute.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ <h4 class="page-title">Compute</h4>
77
<aws-compute *ngIf="provider == 'aws'"></aws-compute>
88

99
<ovh-compute *ngIf="provider == 'ovh'"></ovh-compute>
10+
11+
<digitalocean-compute *ngIf="provider == 'digitalocean'"></digitalocean-compute>
1012
</div>
1113
</div>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.card-golang{
2+
background: #72CEDD !important;
3+
}
4+
5+
6+
.card-python{
7+
background: #FFD344 !important;
8+
}
9+
10+
.limit-column{
11+
max-width: 300px;
12+
text-overflow: ellipsis;
13+
overflow: hidden;
14+
white-space: nowrap;
15+
}
16+
17+
.gcp-logo {
18+
width: 40px !important;
19+
padding-bottom: 10px !important;
20+
}
21+
22+
#gaeBandwidthChart{
23+
min-height: 150px;
24+
}

0 commit comments

Comments
 (0)