Skip to content

Commit caa5682

Browse files
Fix Markdown formatting
1 parent ce1b788 commit caa5682

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ The Nix sets up the development environment with:
2020

2121
The `build.sbt` points to `clang` binaries provided by the `devshell`.
2222

23-
You can use this repo without `nix` if all of the above provided by your own environment (but will need to update the [`build.sbt`](./build.sbt)).
23+
24+
## TODOs
25+
- [ ] non-Nix friendly.
26+
- [ ] build and package with Nix Flakes.
27+
- [ ] automatically build and publish the ELF and the unikernel image.
28+
- [ ] continuous deployment to DigitalOcean.
29+
30+
## Note on Nix
31+
You can use this repo without `nix` if all of the above provided by your own environment, but you will need to update the [`build.sbt`](./build.sbt).
2432

2533
As for `nix` users, `cd` into the repository directory and run `nix develop` to drop into the development environment.\
2634
Or, if you have `direnv` installed, simply `cd` into the repository directory and do `direnv allow`.\
@@ -29,37 +37,42 @@ and erased when you `cd` out of the repository directory.
2937

3038
## Usage
3139

32-
Build the binary: `sbt nativeLink`.\
40+
Build the binary:\
41+
`sbt nativeLink`.
3342

3443
Now, let's use the `ops` command to run it as a QEMU virtual machine packaged as unikernel.\
35-
It binds to the port 80, so we'll need `sudo`: `sudo ops run --port 80 ./target/scala-3.6.3/unikernel-scala-out`.
44+
It binds to the port 80, so we'll need `sudo`:\
45+
`sudo ops run --port 80 ./target/scala-3.6.3/unikernel-scala-out`.
3646

3747

38-
In another terminal window: `curl localhost`.\
48+
In another terminal window:\
49+
`curl localhost`.\
3950
Output:
4051
```
4152
Hello from Scala Native NanoVM Unikernel! Your request: Request(method=GET, uri=/, httpVersion=HTTP/1.1, headers=Headers(Host: localhost, User-Agent: curl/8.11.0, Accept: */*), entity=Entity.Empty)
4253
```
4354

44-
Packaging: `ops build ./target/scala-3.6.3/unikernel-scala-out`.\
55+
Packaging:\
56+
`ops build ./target/scala-3.6.3/unikernel-scala-out`.
4557

46-
Verify the image created: `ops image list`.\
58+
Verify the image created:\
59+
`ops image list`.\
4760
Output:
4861
```
4962
100% |████████████████████████████████████████| [0s:0s]
5063
100% |████████████████████████████████████████| [0s:0s]
5164
Bootable image file:/home/igor/.ops/images/unikernel-scala-out.img
5265
```
5366

54-
The resulting image then can be deployed to any cloud hypervisor which uses QEMU, e.g. [DigitalOcean](https://digitalocean.com).:\
67+
The resulting image then can be deployed to any cloud hypervisor which uses QEMU, e.g. [DigitalOcean](https://digitalocean.com).:
5568
1. "Create Droplet".
5669
2. "Choose Image" -> "Custom Images".
5770
3. "Add Image".
5871
4. Upload your image from `~/.ops/images/unikernel-scala-out.img`.
5972
5. Wait for uploading the image and verification.
6073
6. On your image: "More" -> "Start Droplet".
6174

62-
The app is currently deployed as `http://unikernel.igorramazanov.tech`:
75+
The app is currently deployed as [`http://unikernel.igorramazanov.tech`](http://unikernel.igorramazanov.tech) (you can simply open it in the browser):
6376
```
6477
curl -v http://unikernel.igorramazanov.tech
6578
@@ -93,8 +106,3 @@ instead of the traditional approach with [`coursier/setup-action`](https://githu
93106
1. https://github.com/DeterminateSystems/flake-checker-action
94107
1. https://github.com/DeterminateSystems/magic-nix-cache-action
95108

96-
## TODOs
97-
- [ ] non-Nix friendly.
98-
- [ ] build and package with Nix Flakes.
99-
- [ ] automatically build and publish the ELF and the unikernel image.
100-
- [ ] continuous deployment to DigitalOcean.

0 commit comments

Comments
 (0)