Skip to content

Commit

Permalink
updating package docs (#1322)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Eyberg <[email protected]>
  • Loading branch information
eyberg and Ian Eyberg authored Apr 22, 2022
1 parent 97f4229 commit 04a6d22
Showing 1 changed file with 17 additions and 42 deletions.
59 changes: 17 additions & 42 deletions PACKAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ not intended for developer specific in-house applications.

Ready to create your own package?

### Create from Docker:

You can create a package from Docker like so:

```
ops pkg from-docker node:16.3.0 -f node
```

Or you can create one manually:

### Create Directory

For example if we want to make a package for Lua 5.2.4 we'd have the
Expand Down Expand Up @@ -91,51 +101,16 @@ The name needs to reflect this format:
tar czf "$PKGNAME"_"$PKGVERSION".tar.gz "$PKGNAME"_"$PKGVERSION"
```

### Update the manifest.json

Update the manifest.

```
gsutil cp gs://packagehub/manifest.json .
```

```
shasum -a 256 "$PKGNAME"_"$PKGVERSION".tar.gz
```

```
"lua_5.2.4": {
"runtime" : "lua",
"version": "5.2.4",
"language": "lua",
"description": "lua",
"shasum256":"deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
},
```

### Upload

We'll add a small service for this in the near future depending on
demand but for now you can just email support with your pkg.

```
gsutil cp ~/$lang_$version.tar.gz gs://packagehub/$lang_version.tar.gz
gsutil -D setacl public-read gs://packagehub/$lang_$version.tar.gz
gsutil -D setacl public-read gs://packagehub/manifest.json
```

### NOTE

For some crazy reason google doesn't update the last-modified header and
it gets cached for a while.

I've tried looking at this but that doesn't seem to work either.
https://cloud.google.com/storage/docs/gsutil/commands/setmeta

The default value seems to be one hour cache.
Now you are ready to upload it. If you don't have an account you can
create one for free at https://repo.ops.city. Just sign in with
your github account.

### Backup/Restore:
You can upload it via the web interface at https://repo.ops.city or you
can use the shell:

```
gsutil rsync -r gs://packagehub .
ops pkg login <api_key>
ops pkg push <my_package>
```

0 comments on commit 04a6d22

Please sign in to comment.