You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+70-10
Original file line number
Diff line number
Diff line change
@@ -27,19 +27,74 @@ Logsmith is a desktop trayicon to:
27
27
- run ascript after login
28
28
- has a graphical user interface and a cli
29
29
30
-
## Config
31
-
The config will be stored in `${HOME}/.logsmith/accounts.yaml` and should look like this:
30
+
access-key name! it must be
31
+
32
+
## Getting started
33
+

34
+
**Warning**: logsmith will write in your `.aws/credentials` and `./aws/config` files and part of its feature set is to remove unused profiles.
35
+
This includes potential **access-keys** (which are profiles as well). If you have data in there that must not be lost, please back up the data beforehand.
36
+
37
+
Logsmith identifies access-keys if their profile name starts with `access-key` (e.g. `access-key` or `access-key-foo`) and will not remove them.
38
+
39
+
### Run from source
40
+
If you want to run logsmith from source, please use the following steps:
41
+
42
+
#### 1. Clone this repository
43
+
```bash
44
+
git clone https://github.com/otto-de/logsmith.git
45
+
cd logsmith
46
+
```
47
+
48
+
#### 2. Install the dependencies
49
+
```bash
50
+
./setup.sh
51
+
```
52
+
This will create a venv.
53
+
54
+
#### 3. Run application
55
+
```bash
56
+
./run.sh
57
+
```
58
+
After startup, a small cloud should appear in the start bar (this application has no main window).
59
+
60
+
#### 4. Add access-key (aws)
61
+
Click on the cloud and select "Set access key".
62
+
63
+
A dialog will appear where you can add your access key data. Please be advised that an access-key must start with the prefix `access-key`. The default name is simply `access-key`.
64
+
65
+
#### 5. Add configuration
66
+
To add your configuration for the accounts and profiles (aka profile groups) you want to login in, click on the cloud and select "Edit Config".
67
+
68
+
A dialog will appear where you can add your configuration in a text form. This config must be YAML conform, please see in the [Configuration](#Configuration) section down below for more instructions.
69
+
70
+
If you have used another name for your **access-key**, you may set it in the profile group, or you may set a default access-key name in the config dialog.
71
+
72
+
#### 6. Select a profile group
73
+
To start the login process, click on the cloud and select the profile group you want to login in, on success the cloud will change its color to the color you have set in the configuration. The login process will be repeated every 5 minutes to keep you logged in.
74
+
75
+
If an error occurs, the cloud icon will turn into a red bug. To see the error, click on the cloud and select "Show logs".
76
+
77
+
Be advised that in some cases a dialog may be opened in the background and will not appear in the taskbar.
78
+
79
+
## Configuration
80
+
The configuration is a YAML file that contains any number of profile groups. Each profile group can contain any number of profiles which will be assumed when the profile group is selected.
81
+
82
+
**Warning**: If you have account ids with leading zeros, please make sure to put them in quotes, otherwise they will be interpreted as octal numbers.
83
+
84
+
Do not use "access-key" (or anything with prefix "access-key") or "service" as profile names. These are reserved for access keys and service profiles.
85
+
32
86
```yaml
33
87
productive: # profile group name (will be displayed)
34
-
team: team1 #your team name, used in support files
35
-
region: eu-central-1 #your default region
88
+
team: team1 # team name (used in support files)
89
+
region: eu-central-1 # default region
36
90
color: '#388E3C'# color code used to color the tray icon
37
91
script: 'some-script.sh'# script to run after login (optional)
92
+
access_key: 'access-key'# access-key name that this group should use (optional)
38
93
profiles:
39
94
- profile: nonlive # local profile name
40
95
account: '123456789123'# account id
41
96
role: developer # role name that will be assumed
42
-
default: true # flag if this profile should be the default profile
97
+
default: true # flag if this profile should be the default profile (optional)
43
98
- profile: live
44
99
account: '123456789123'
45
100
role: developer
@@ -61,7 +116,7 @@ gcp-project-prd:
61
116
type: gcp
62
117
```
63
118
64
-
If you have account ids with leading zeros, please make sure to put them in quotes.
119
+
This config will be stored in `${HOME}/.logsmith/accounts.yaml`.
65
120
66
121
### Google Cloud login
67
122
Click on the project that you want to use, this will trigger the typical login flow for user and application
@@ -177,20 +232,25 @@ If you provide one of the following parameter logsmith will automatically start
177
232
Example to login with cli mode:
178
233
```bash
179
234
./logsmith --login team1
180
-
```
235
+
```
181
236
182
-
## How to package
237
+
## Create a binary
183
238
If you want to build a binary, please use the following steps:
184
239
240
+
#### 1. Install the dependencies
241
+
This will create a venv.
185
242
```bash
186
243
./setup.sh
244
+
```
245
+
246
+
#### 3. Build the binary
247
+
```bash
187
248
./package.sh
188
249
```
189
250
190
251
The binary will be in `dist`.
191
252
192
-
### Mac
193
-
For mac, just drop the `dist/logsmith.app` in your application directory.
253
+
For Mac, copy the `dist/logsmith.app` in your application directory.
0 commit comments