Skip to content

Commit c2d2810

Browse files
committed
add "Getting started" to README
1 parent b75f6c5 commit c2d2810

File tree

2 files changed

+71
-10
lines changed

2 files changed

+71
-10
lines changed

README.md

+70-10
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,74 @@ Logsmith is a desktop trayicon to:
2727
- run ascript after login
2828
- has a graphical user interface and a cli
2929

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+
![](./docs/warning.svg)
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+
![](./docs/warning.svg) **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+
3286
```yaml
3387
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
3690
color: '#388E3C' # color code used to color the tray icon
3791
script: 'some-script.sh' # script to run after login (optional)
92+
access_key: 'access-key' # access-key name that this group should use (optional)
3893
profiles:
3994
- profile: nonlive # local profile name
4095
account: '123456789123' # account id
4196
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)
4398
- profile: live
4499
account: '123456789123'
45100
role: developer
@@ -61,7 +116,7 @@ gcp-project-prd:
61116
type: gcp
62117
```
63118
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`.
65120

66121
### Google Cloud login
67122
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
177232
Example to login with cli mode:
178233
```bash
179234
./logsmith --login team1
180-
```
235+
```
181236

182-
## How to package
237+
## Create a binary
183238
If you want to build a binary, please use the following steps:
184239

240+
#### 1. Install the dependencies
241+
This will create a venv.
185242
```bash
186243
./setup.sh
244+
```
245+
246+
#### 3. Build the binary
247+
```bash
187248
./package.sh
188249
```
189250

190251
The binary will be in `dist`.
191252

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.
194254

195255
## Icons
196256
![](./app/assets/app_icon.png)

docs/warning.svg

+1
Loading

0 commit comments

Comments
 (0)