Skip to content

Commit

Permalink
Create Release v0.1.0
Browse files Browse the repository at this point in the history
Signed-off-by: David Schall <david.schall@ed.ac.uk>
  • Loading branch information
dhschall committed Jun 18, 2022
1 parent 9b5acbc commit 514a50f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
workflow: create_base_image.yml
name: disk-image-amd64
# workflow_conclusion: success
run_id: 2477855216
run_id: 2516383957
path: disktmp


Expand Down
2 changes: 1 addition & 1 deletion docs/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Brew yourself a coffee ☕️😉 in the meantime. It can take its time to to se

3. **Download latest release artifacts** *(~3 min)*

With vSwarm-&mu; we distribute a compiled kernel, client and ready to use and tested disk image. You can find the latest release of those resources on the [release page](https://github.com/ease-lab/vSwarm-u/releases) of the repo. Refer to the [resources](setup/setup.md#get-resources) section in the documentation for more details how to download and use them.
With vSwarm-&mu; we distribute a compiled kernel, client and ready to use and tested disk image. You can find the latest release of those resources on the [release page](https://github.com/ease-lab/vSwarm-u/releases) of the repo. Refer to the [resources](./setup/resources.md#download-resources-artifacts) section in the documentation for more details how to download and use them.


### Test Downloads
Expand Down
11 changes: 5 additions & 6 deletions docs/setup/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In order to run serverless simulations with gem5 you will need we will need a fe
Setting up and building all those resources from scratch can be tricky to get it right and is also quite time consuming therefore we distribute together with vSwarm-u an up to date and pre-configured disk image as well as a compiled kernel and test client. For quickly ramping up your system follow the easy steps [here](#download-resources-artifacts) to download those resources. For more advanced use and customization find out all the details how we build and configure the resources yourself in related documentation ([kernel](./kernel.md), [disk-image](./disk-image.md))


## Environmental variables
## Environmental Variables
We use the `RESOURCES` environmental variable in all our scripts to define where they can find the resources: kernel, base disk image and the client. Furthermore we `GEM5_DIR` to define where gem5 will be downloaded and installed. If you want to specify your own paths set and expose this variables before running one of the scripts.
```bash
export RESOURCES=<your/resources/dir>
Expand All @@ -22,14 +22,13 @@ echo 'export RESOURCES=${RESOURCES}' >> ${HOME}/.bashrc
The default paths are `resources/` and `${RESOURCES}/gem5` for `RESOURCES` and `GEM5_DIR` respectively.


## Download Resources Artifacts.
## Download Resources Artifacts

In the resources folder you will find a `release.json` file that contains all information about the latest release and its the artifacts we distribute. This file is always in sync with the latest release.
The `artifacts.py` script will use this information to fetch the latest artifacts. Run:
To download resource artifact use the `artifacts.py` script in `resources/` with:
```bash
./resources/artifacts.py --download
./resources/artifacts.py
```
to fetch the latest kernel, disk-image and client from github.
The script will fetch the latest kernel, disk-image and client from github. In case you want another version use the `--version` argument.
Note that the size of the disk image is a few GiB. Furthermore, Github has a limit of 2GiB per asset. We compress and split the disk image. But no worries the script will do everything for you ;). Downloading merging and decompression. *Usually it took about three minutes. (2.5min for download and 30s for decompressing)*

By default the resources will be stored in the `resources/`
Expand Down
2 changes: 1 addition & 1 deletion resources/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ROOT := $(abspath $(dir $(mkfile_path))/../)
RESOURCES ?=$(ROOT)/resources/


VERSION := v0.0.7
VERSION := v0.1.0
TAG := $(VERSION)-$(shell git rev-parse --short HEAD)
ARCH := amd64

Expand Down
23 changes: 10 additions & 13 deletions resources/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
help="Path to the release file. Default 'resources/release.json'")
parser.add_argument("--download","-d", default=False, action="store_true", help = "Download release assets")
# parser.add_argument("--upload","-u", default=False, action="store_true", help = "Upload release assets")
parser.add_argument("--version", "-v", default=False, action="store_true",help="Get release version")
parser.add_argument("--version", "-v", type=str, default="latest", help="Set version from where to download")
parser.add_argument("--output", "-o", type=str, default=f"{RESOURCES}/",
help="Output directory to store the assets to. Default: 'resources/'")
args = parser.parse_args()
Expand Down Expand Up @@ -129,13 +129,12 @@ def get_latest_release():
headers = {}
response = requests.get(RELEASES_API, headers=headers)

print("debug: " + str(response.status_code))
# print("debug: " + str(response.status_code))

RELEASE = response.json()
with open("rel.json", "w") as f:
json.dump(RELEASE, f)
RELEASES_LEN = len(RELEASE)
print(RELEASES_LEN)
return RELEASE

def get_release(tag_name="latest"):
Expand Down Expand Up @@ -198,10 +197,14 @@ def get_urls(release, name=""):



def downloadLatestMoveAssets():
def downloadMoveAssets(version="latest"):

release=get_latest_release()
print("Download Artifacts")
if version == "latest":
release=get_latest_release()
else:
release=get_release(version)

print(f"Download Artifacts from version: {get_version(release)}")
name = "vmlinux"
kernel_url = get_url(release=release,name=name)
downloadAsset(kernel_url)
Expand Down Expand Up @@ -266,10 +269,4 @@ def getVersion():


if __name__ == '__main__':
if args.version:
getVersion()
elif args.download:
downloadLatestMoveAssets()
else:
log.warning(" You don't want me to do something?")
parser.print_help()
downloadMoveAssets(args.version)

0 comments on commit 514a50f

Please sign in to comment.