update CONTRIBUTING

This commit is contained in:
zramsay 2023-01-20 11:35:57 -05:00
parent 00c1515807
commit d3f63b8975
No known key found for this signature in database
GPG Key ID: FECD2DBFAE9DBE63
2 changed files with 28 additions and 15 deletions

View File

@ -8,9 +8,9 @@ Stack Orchestrator allows building and deployment of a Laconic Stack on a single
Ensure that the following are already installed:
- [Python3](https://wiki.python.org/moin/BeginnersGuide/Download)
- [Docker](https://docs.docker.com/get-docker/)
- [Docker Compose](https://docs.docker.com/compose/install/)
- [Python3](https://wiki.python.org/moin/BeginnersGuide/Download): `python3 --version` >= `3.10.8`
- [Docker](https://docs.docker.com/get-docker/): `docker --version` >= `20.10.21`
- [Docker Compose](https://docs.docker.com/compose/install/): `docker-compose --version` >= `2.13.0`
Note: if installing docker-compose via package manager (as opposed to Docker Desktop), you must [install the plugin](https://docs.docker.com/compose/install/linux/#install-the-plugin-manually), e.g., on Linux:
@ -97,7 +97,7 @@ laconic-so --verbose deploy-system --include ipld-eth-db,go-ethereum-foundry,ipl
## Contributing
See the [CONTRIBUTING.md](.github/CONTRIBUTING.md) for developer mode install.
See the [CONTRIBUTING.md](/docs/CONTRIBUTING.md) for developer mode install.
## Platform Support

View File

@ -5,8 +5,11 @@ Thank you for taking the time to make a contribution to Stack Orchestrator.
## Install (developer mode)
Suitable for developers either modifying or debugging the orchestrator Python code:
#### Prerequisites
In addition to the binary install prerequisites listed above, the following are required:
### Prerequisites
In addition to the pre-requisites listed in the [README](/README.md), the following are required:
1. Python venv package
This may or may not be already installed depending on the host OS and version. Check by running:
```
@ -18,26 +21,32 @@ In addition to the binary install prerequisites listed above, the following are
```
$ apt install python3.10-venv
```
#### Install
### Install
1. Clone this repository:
```
$ git clone (https://github.com/cerc-io/stack-orchestrator.git
```
4. Enter the project directory:
2. Enter the project directory:
```
$ cd stack-orchestrator
```
5. Create and activate a venv:
3. Create and activate a venv:
```
$ python3 -m venv venv
$ source ./venv/bin/activate
(venv) $
```
6. Install the cli in edit mode:
4. Install the cli in edit mode:
```
$ pip install --editable .
```
7. Verify installation:
5. Verify installation:
```
(venv) $ laconic-so
Usage: laconic-so [OPTIONS] COMMAND [ARGS]...
@ -56,19 +65,23 @@ In addition to the binary install prerequisites listed above, the following are
setup-repositories git clone the set of repositories required to build...
```
#### Build a zipapp (single file distributable script)
## Build a zipapp (single file distributable script)
Use shiv to build a single file Python executable zip archive of laconic-so:
1. Install [shiv](https://github.com/linkedin/shiv):
```
$ (venv) pip install shiv
$ (venv) pip install wheel
```
1. Run shiv to create a zipapp file:
2. Run shiv to create a zipapp file:
```
$ (venv) shiv -c laconic-so -o laconic-so .
```
This creates a file `./laconic-so` that is executable outside of any venv, and on other machines and OSes and architectures, and requiring only the system Python3:
1. Verify it works:
3. Verify it works:
```
$ cp stack-orchetrator/laconic-so ~/bin
$ laconic-so
@ -88,4 +101,4 @@ Use shiv to build a single file Python executable zip archive of laconic-so:
setup-repositories git clone the set of repositories required to build...
```
For cutting releases, use the [shiv build script](/scripts/build_shiv_package.sh).