Skip to content

Commit

Permalink
release: v0.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoBonacci committed Jan 14, 2021
1 parent 493fed5 commit da34e72
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 30 deletions.
17 changes: 14 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
# Changelog

## Release: v0.20.0 (2021-01-03)
## Release: v0.21.0 (2021-01-14)

* [**BREAKING**] Expand version numbers to support more digits from 5 to 20
See [migration procedure](https://cljdoc.org/d/com.brunobonacci/oneconfig/CURRENT/doc/user-guides/migration-procedure)

## Release: v0.20.0 (2021-01-03) *(DON'T USE THIS VERSION, use: `0.21.0` or newer)*

* [**BREAKING**] Dropped `aws-ancryption-sdk` in favour of direct KMS API use.
See [migration procedure](https://cljdoc.org/d/com.brunobonacci/oneconfig/CURRENT/doc/user-guides/migration-procedure)
* Switched from Amazonica to Cognitect's aws-api client for AWS.
* Native binaries for command line tool.
* Switched from Cheshire to Jasonista (to reduce library version clash)

## Release: v0.17.0 (2021-01-03)
## Release: v0.17.1 (2021-01-14)

* Transition version in preparation for `v0.20.0`. **Use this
* Transition version in preparation for `v0.21.0`. **Use this
version if you have an existing installation of 1Config,
jump to the new version if you are starting on a new account.**
* Migration tool to migrate database to new format
* `SET` command saves in both versions

## Release: v0.17.0 (2021-01-03) *(use: `v0.17.1`)*

* Transition version in preparation for `v0.2x.0`.
* Migration tool to migrate database to new format
* `SET` command saves in both versions

## Release: v0.16.4 (2020-04-04)

* Added AOT compiled library Jar
Expand Down
36 changes: 18 additions & 18 deletions doc/migration-procedure.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Migration Procedure

Since v0.20.0, 1Config uses a different storage format.
Since `v0.21.0`, 1Config uses a different storage format.
v0.16.4 used KMS in combination with the [aws-encryption-sdk](https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/introduction.html)
which provided support for generating data keys and store them
along with the encrypted data using a custom [binary format](https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/message-format.html).
Expand All @@ -9,7 +9,7 @@ For quite a long time I've tried to compile the `1cfg` CLI tool using
GraalVM. However, I failed to generate a valid configuration for
GraalVM native-image builder. The executable JAR of v0.16.4 works fine
but it rather slow. So I decided to drop the `aws-encryption-sdk` and
use KMS api directly. As of version v0.20.0 this is now the way 1cfg works.
use KMS api directly. As of version `v0.21.0` this is now the way 1cfg works.
This allowed me to produce native binaries which are 1 order of magnitude
faster than the executable sdk.

Expand All @@ -18,47 +18,47 @@ of model of 1cfg, it just removed one encryption envelope, and since
the library doesn't manage the encryption material directly, it is as safe
as before to use.

**If you are starting new installation of 1cfg, it is recommended to start using v0.20.0 only.**
**If you are starting new installation of 1cfg, it is recommended to start using v0.21.0 only.**

In order to migrate your existing installation I produced a new
*transition* version (`v0.17.0`). The version v0.17.0 is a transition
version between the old format v0.16.4 and the new persistence format
v0.20.0.Use this version only if you have an existing installation
that you want to migrate to v0.20.0+. Use v0.16.4 if you happy with
*transition* version (`v0.17.1`). The version `v0.17.1` is a transition
version between the old format `v0.16.4` and the new persistence format
`v0.21.0`. Use this version only if you have an existing installation
that you want to migrate to `v0.21.0+`. Use `v0.16.4` if you happy with
your current solution.

This version has a migration task to migrate the database to a new
persistence format. In addition to the one-time migration step, when
you `SET` a new configuration entry, the entry will be written in two
different format, the old one and the new one thus allowing the
version v0.20.0 to read it as well.
version `v0.21.0` to read it as well.

```
v0.20.0 GET SET LIST (new format only)
v0.21.0 GET SET LIST (new format only)
^ |
| v
v0.17.0 GET SET LIST
v0.17.1 GET SET LIST
| | |
v v v
v0.16.4 GET SET LIST (old format only)
```


The version v0.20.0 can only `GET` and `SET` entries with the new format,
while v0.17.0 will `GET` and `LIST` work as before, `SET` will write both
The version `v0.21.0` can only `GET` and `SET` entries with the new format,
while `v0.17.1` will `GET` and `LIST` work as before, `SET` will write both
formats.

In the next section I will describe the steps required to migrate to the new
version of *1Config.

## Migration step

#### (1). Download v0.17.0
#### (1). Download v0.17.1
We will call this version `1cfgM` with `M` for "migration".
``` bash
mkdir -p ~/bin
wget https://github.com/BrunoBonacci/1config/releases/download/0.17.0/1cfg -O ~/bin/1cfgM
wget https://github.com/BrunoBonacci/1config/releases/download/0.17.0/1cfg-ui-beta -O ~/bin/1cfg-ui-betaM
wget https://github.com/BrunoBonacci/1config/releases/download/0.17.1/1cfg -O ~/bin/1cfgM
wget https://github.com/BrunoBonacci/1config/releases/download/0.17.1/1cfg-ui-beta -O ~/bin/1cfg-ui-betaM
chmod +x ~/bin/1cfgM ~/bin/1cfg-ui-betaM
export PATH=~/bin:$PATH
```
Expand Down Expand Up @@ -97,15 +97,15 @@ You can use the similar command to test GET and SET.
#### (3) Once the migration is done, now it is time to upgrade the clients.

**Upgrade all the application to use the new library version** and redeploy the apps.
- `[com.brunobonacci/oneconfig "0.20.0"]` for Leiningen projects
- `{:deps { com.brunobonacci/oneconfig {:mvn/version "0.22.0"} }}` for `deps.edn` projects
- `[com.brunobonacci/oneconfig "0.21.0"]` for Leiningen projects
- `{:deps { com.brunobonacci/oneconfig {:mvn/version "0.21.0"} }}` for `deps.edn` projects
- For Java projects
```
<!-- https://mvnrepository.com/artifact/com.brunobonacci/oneconfig -->
<dependency>
<groupId>com.brunobonacci</groupId>
<artifactId>oneconfig</artifactId>
<version>0.22.0</version>
<version>0.21.0</version>
<classifier>aot</classifier>
</dependency>
```
Expand Down
10 changes: 5 additions & 5 deletions doc/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Quick start guide to install and use 1Config.

``` bash
mkdir -p ~/bin
wget https://github.com/BrunoBonacci/1config/releases/download/0.20.0/1cfg-`uname` -O ~/bin/1cfg
wget https://github.com/BrunoBonacci/1config/releases/download/0.20.0/1cfg-ui-beta -O ~/bin/1cfg-ui-beta
wget https://github.com/BrunoBonacci/1config/releases/download/0.20.0/1cfgX -O ~/bin/1cfgX
wget https://github.com/BrunoBonacci/1config/releases/download/0.21.0/1cfg-`uname` -O ~/bin/1cfg
wget https://github.com/BrunoBonacci/1config/releases/download/0.21.0/1cfg-ui-beta -O ~/bin/1cfg-ui-beta
wget https://github.com/BrunoBonacci/1config/releases/download/0.21.0/1cfgX -O ~/bin/1cfgX
chmod +x ~/bin/1cfg ~/bin/1cfgX ~/bin/1cfg-ui-beta
export PATH=~/bin:$PATH
```
Expand All @@ -27,8 +27,8 @@ export PATH=~/bin:$PATH

- Open a terminal window
- Create installation dir `md %userprofile%\1config\bin`
- Download https://github.com/BrunoBonacci/1config/releases/download/0.20.0/1cfgX and save it in the above folder
- Download https://github.com/BrunoBonacci/1config/releases/download/0.20.0/1cfg-ui-beta and save it in the above folder
- Download https://github.com/BrunoBonacci/1config/releases/download/0.21.0/1cfgX and save it in the above folder
- Download https://github.com/BrunoBonacci/1config/releases/download/0.21.0/1cfg-ui-beta and save it in the above folder
- Rename file into `1cfg.cmd` with `ren %userprofile%\1config\bin\1cfgX %userprofile%\1config\bin\1cfg.cmd`
- Rename file into `1cfg-ui-beta.cmd` with `ren %userprofile%\1config\bin\1cfg-ui-beta %userprofile%\1config\bin\1cfg-ui-beta.cmd`
- Add it to the System path:
Expand Down
4 changes: 2 additions & 2 deletions doc/usage-with-clojure.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ In order to use the library add the dependency to your `project.clj`

``` clojure
;; Leiningen project
[com.brunobonacci/oneconfig "0.20.0"]
[com.brunobonacci/oneconfig "0.21.0"]

;; deps.edn format
{:deps { com.brunobonacci/oneconfig {:mvn/version "0.20.0"} }}
{:deps { com.brunobonacci/oneconfig {:mvn/version "0.21.0"} }}
```

Latest version: [![Clojars Project](https://img.shields.io/clojars/v/com.brunobonacci/oneconfig.svg)](https://clojars.org/com.brunobonacci/oneconfig)
Expand Down
2 changes: 1 addition & 1 deletion doc/usage-with-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Then add the dependency
<dependency>
<groupId>com.brunobonacci</groupId>
<artifactId>oneconfig</artifactId>
<version>0.20.0</version>
<version>0.21.0</version>
<classifier>aot</classifier>
</dependency>
```
Expand Down
5 changes: 5 additions & 0 deletions test/bin/end-2-end-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ $CFG1 SET -b dynamo -e test1 -k 'test/service1' -v '1.12.0' -t txt 'value-1120'
[ "$($CFG1 GET -b dynamo -e test1 -k 'test/service1')" = "value-1120" ] || exit 9


echo "(*) verify you can use big numbers for versions numbers"
$CFG1 SET -b dynamo -e test1 -k 'test/service1' -v '1234567890123456789.1234567890123456789.1234567890123456789' -t txt 'value-1234567890123456789'
[ "$($CFG1 GET -b dynamo -e test1 -k 'test/service1' -v '1234567890123456789.1234567890123456789.1234567890123456789')" = "value-1234567890123456789" ] || exit 16


echo "(*) can use specific encryption key"
$CFG1 SET -b dynamo -e test1 -k 'test/super-service' -v '1.1.3' -t txt 'super-113' -m 'test/service1'
[ "$($CFG1 GET -b dynamo -e test1 -k 'test/super-service' -v '2.8.0')" = 'super-113' ] || exit 10
Expand Down
2 changes: 1 addition & 1 deletion ver/1config.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.20.0
0.21.0

0 comments on commit da34e72

Please sign in to comment.