Skip to content

Commit

Permalink
Gitea x Laconicd + some doc updates (#549)
Browse files Browse the repository at this point in the history
* combine instructions from 2 stacks


Former-commit-id: 77d194c

* tidy doc

---------

Co-authored-by: zramsay <[email protected]>
  • Loading branch information
zramsay and zramsay authored Sep 27, 2023
1 parent bc78c5e commit 33e443f
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 3 deletions.
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Stack Orchestrator

Here you will find information about the design of stack orchestrator, contributing to it, and deploying services/applications that combine two or more "stacks".

Most "stacks" contain their own README which has plenty of information on deploying, but stacks can be combined in a variety of ways which are document here, for example:

- [Gitea with Laconicd Fixturenet](./gitea-with-laconicd-fixturenet.md)
- [Laconicd Registry with Console](./laconicd-with-console.md)
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Sub-commands and flags

Clone a single repository:
```
$ laconic-so setup-repositories --include cerc-io/go-ethereum
$ laconic-so setup-repositories --include github.com/cerc-io/go-ethereum
```
Clone the repositories for a stack:
```
Expand Down
80 changes: 80 additions & 0 deletions docs/gitea-with-laconicd-fixturenet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Gitea x NPMs X Laconicd

Deploy a local Gitea server, publish NPM packages to it, then use those packages to build a Laconicd fixturenet. Demonstrates several components of the Laconic stack

### Build and Deploy Gitea

```bash
laconic-so --stack build-support build-containers
laconic-so --stack package-registry setup-repositories
laconic-so --stack package-registry build-containers
laconic-so --stack package-registry deploy up
```

These commands can take awhile. Eventually, some instructions and a token will output. Set `CERC_NPM_AUTH_TOKEN`:

```bash
export CERC_NPM_AUTH_TOKEN=<your-token>
```

### Configure the hostname gitea.local

How to do this depends on your operating system but usually involves editing a `hosts` file. For example, on Linux add this line to the file `/etc/hosts` (needs sudo):

```bash
127.0.0.1 gitea.local
```

Test with:

```bash
ping gitea.local
```

```bash
PING gitea.local (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.147 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.033 ms
```

Although not necessary in order to build and publish packages, you can now access the Gitea web interface at: [http://gitea.local:3000](http://gitea.local:3000) using these credentials: `gitea_admin/admin1234` (Note: please properly secure Gitea if public internet access is allowed).

### Build npm Packages

Clone the required repositories:

```bash
laconic-so --stack fixturenet-laconicd setup-repositories
```

Build and publish the npm packages:

```bash
laconic-so --stack fixturenet-laconicd build-npms
```

Navigate to the Gitea console and switch to the `cerc-io` user then find the `Packages` tab to confirm that these two npm packages have been published:

- `@cerc-io/laconic-registry-cli`
- `@cerc-io/laconic-sdk`

### Build and deploy fixturenet containers

```bash
laconic-so --stack fixturenet-laconicd build-containers
laconic-so --stack fixturenet-laconicd deploy up
```

Check the logs:

```bash
laconic-so --stack fixturenet-laconicd deploy logs
```

### Test with the registry CLI

```bash
laconic-so --stack fixturenet-laconicd deploy exec cli "laconic cns status"
```

Try additional CLI commands, documented [here](https://github.com/cerc-io/laconic-registry-cli#operations).
File renamed without changes.
3 changes: 1 addition & 2 deletions docs/spec.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Specification

(note this page is out of date)

Note: this page is out of date (but still useful) - it will no longer be useful once stacks are [decoupled from the tool functionality](https://github.com/cerc-io/stack-orchestrator/issues/315).

## Implementation

Expand Down

0 comments on commit 33e443f

Please sign in to comment.