Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Update Redis app directory #20

Merged
merged 17 commits into from
Oct 3, 2023

Conversation

razvand
Copy link
Contributor

@razvand razvand commented Sep 9, 2023

Rework the contents of the Redis app directory to make it more suitable for users (prime tool is KraftKit) and for developers (prime tools are Make, Kconfig, QEMU / Firecracker).

Move and output files in dedicated directories to keep the root directory clean: kraft.yaml, README.md, Makefile, Makefile.uk are the only files in the dedicated directories.

Update README.md according to the new structure.

Improve support for KraftKit: documentation, run scriipts, testing.

@razvand razvand added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 9, 2023
@razvand razvand changed the base branch from stable to staging September 9, 2023 18:04
Copy link
Member

@StefanJum StefanJum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few comments.

  • Do we only provide basic config files? (i.e. not the pie-paging etc. ones)
  • Would it make sense to keep the config naming convention kraft uses (config.appname-arch...)?

README.md Outdated
Comment on lines 78 to 83
Note that, if you want to build for a different architecture then the previous build, currently you are required to remove the generated files.
For that, run the command:

```console
rm -fr .config* .unikraft/
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that required when using kraft?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I get errors if I don't do that.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@razvand
Copy link
Contributor Author

razvand commented Sep 10, 2023

Do we only provide basic config files? (i.e. not the pie-paging etc. ones)

I will add all of them from the maintainer-tools repository.

Would it make sense to keep the config naming convention kraft uses (config.appname-arch...)?

My thought was to simplify the names as much as possible. But if more people think we should use config.appname-..., then I will update accordingly. Cc: @skuenzer , @nderjung , @andreittr

Copy link
Member

@StefanJum StefanJum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add all of them from the maintainer-tools repository.

Perfect

My thought was to simplify the names as much as possible. But if more people think we should use config.appname-..., then I will update accordingly.

Makes sense, I don't have a strong opinion here, just if maybe the configs can be used by kraft somehow, but that should not be the case since kraft should only care about the kraft.yaml file.

It looks all good on my side besides the one small comment.

README.md Outdated Show resolved Hide resolved
`.unikraft/` was previously used as the directory to clone library
repositories (including the `unikraft` core repository). Being a hidden,
it is not immediately available to the developer.

Use `workdir/` instead.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
For consistency on placing external and generated files, place the build
directory in `workdir/build/` instead of `build/`.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
The build system may bump into issues when using `make` right out the
configuration.

Use `make prepare` before `make` for a "safe" build.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Move configuration files to `defconfigs/` directory to have them all in
one place. Simplify their names and remove the preceding dot, to make
them visible to the developer / user.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Move run scripts to `run/` directory. This cleans up the application
root directory. Remove the `run-` prefix from their name; this combines
nicely with the `run/` directory that will prefix the run comman

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Remove instructions to create and enter directories. `git clone`
commands create the necessary parent directories.

This simplifies the instructions in `README.md`.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
`fs1` is used by KraftKit as the root device. Update `kraft.yaml`
accordingly, to use `fs1` instead of `fs0`.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Update `redis.conf` configuration file to bind the Redis server to all
addresses (`0.0.0.0`), instead of just `172.44.0.2`.

This is useful when using networking setups where the address is not
beforehand and cannot be filled in the configuration file.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Add scripts in the `run/` directory that use `kraft run` to start
Unikraft Redis instances. Add scripts for targets in `kraft.yaml`.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
`fs0` is a leftover term. Use `rootfs` as the name of the directory
storing the root filesystem. It corresponds better to its purpose.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Use `fs1` instead of `fs0` for basic builds for consistency with
KraftKit, that defaults to `fs1` as the first mount tag.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
@razvand razvand assigned StefanJum and unassigned skuenzer Oct 1, 2023
Update all configurations in `kraft.yaml` to feature proper
configuration options. Use `arm64` instead of `aarch64` in target
names.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reduce default configuration files (in the `deconfigs/` directory) to
their minimal configurations. Also add default configuration file for
Firecracker on AArch64.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Add `scripts/` directory that provides support for generating build and
run scripts. Generator script is stored externally, in the `app-testing`
repository.

The `run.yaml` file defines the possible running configurations.

This deprecates the `run/` directory, so remove it.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Update `.gitignore` to ignore generated `rootfs.cpio` file. Previously,
the `fs0.cpio` file was generated.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Update instructions for building. Add instruction on using build and run
scripts. Add detailed commands on building and running.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
@razvand razvand force-pushed the razvand/update-app-directory branch from 8a03a45 to d748d7d Compare October 1, 2023 04:10
@razvand razvand requested a review from StefanJum October 1, 2023 04:11
Copy link
Member

@StefanJum StefanJum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either add the setup.sh script (and mention it in the TLDR section) or add the cloning steps back into the TLDR section.

@razvand razvand requested a review from StefanJum October 2, 2023 03:29
Introduce `scripts/setup.sh` script to clone repositories in the
`workdir/` directory.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
@razvand razvand force-pushed the razvand/update-app-directory branch from ca20c73 to 99da53c Compare October 2, 2023 04:00
Copy link
Member

@StefanJum StefanJum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com
Approved-by: Stefan Jumarea stefanjumarea02@gmail.com

@razvand razvand merged commit 67ec01f into unikraft:staging Oct 3, 2023
@razvand razvand deleted the razvand/update-app-directory branch October 3, 2023 15:19
razvand added a commit that referenced this pull request Oct 3, 2023
`.unikraft/` was previously used as the directory to clone library
repositories (including the `unikraft` core repository). Being a hidden,
it is not immediately available to the developer.

Use `workdir/` instead.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
For consistency on placing external and generated files, place the build
directory in `workdir/build/` instead of `build/`.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
The build system may bump into issues when using `make` right out the
configuration.

Use `make prepare` before `make` for a "safe" build.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Move configuration files to `defconfigs/` directory to have them all in
one place. Simplify their names and remove the preceding dot, to make
them visible to the developer / user.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Move run scripts to `run/` directory. This cleans up the application
root directory. Remove the `run-` prefix from their name; this combines
nicely with the `run/` directory that will prefix the run comman

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
eviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Remove instructions to create and enter directories. `git clone`
commands create the necessary parent directories.

This simplifies the instructions in `README.md`.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
`fs1` is used by KraftKit as the root device. Update `kraft.yaml`
accordingly, to use `fs1` instead of `fs0`.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Update `redis.conf` configuration file to bind the Redis server to all
addresses (`0.0.0.0`), instead of just `172.44.0.2`.

This is useful when using networking setups where the address is not
beforehand and cannot be filled in the configuration file.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Add scripts in the `run/` directory that use `kraft run` to start
Unikraft Redis instances. Add scripts for targets in `kraft.yaml`.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
`fs0` is a leftover term. Use `rootfs` as the name of the directory
storing the root filesystem. It corresponds better to its purpose.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Use `fs1` instead of `fs0` for basic builds for consistency with
KraftKit, that defaults to `fs1` as the first mount tag.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Update all configurations in `kraft.yaml` to feature proper
configuration options. Use `arm64` instead of `aarch64` in target
names.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Reduce default configuration files (in the `deconfigs/` directory) to
their minimal configurations. Also add default configuration file for
Firecracker on AArch64.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Add `scripts/` directory that provides support for generating build and
run scripts. Generator script is stored externally, in the `app-testing`
repository.

The `run.yaml` file defines the possible running configurations.

This deprecates the `run/` directory, so remove it.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Update `.gitignore` to ignore generated `rootfs.cpio` file. Previously,
the `fs0.cpio` file was generated.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Update instructions for building. Add instruction on using build and run
scripts. Add detailed commands on building and running.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
razvand added a commit that referenced this pull request Oct 3, 2023
Introduce `scripts/setup.sh` script to clone repositories in the
`workdir/` directory.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Stefan Jumarea <stefanjumarea02@gmail.com>
GitHub-Closes: #20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants