Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jjcarstens/poser
https://github.com/jjcarstens/poser
hacktoberfest
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jjcarstens/poser
- Owner: jjcarstens
- Created: 2019-06-10T21:08:22.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-26T17:05:44.000Z (almost 2 years ago)
- Last Synced: 2023-03-05T22:49:03.075Z (almost 2 years ago)
- Topics: hacktoberfest
- Language: Elixir
- Homepage:
- Size: 62.5 KB
- Stars: 5
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Poser
Simple app that poses as a device locally to experiment connecting to NervesHub
## Usage
* Create a `poser-signer` cert and key (requires `nerves_key` repo)
```bash
$ cd nerves_key
$ mix nerves_key.signer create poser-signer --years-valid 20
$ cp poser-signer.* ../poser/nerves-hub/
```* Create the device and device certificates
```bash
$ cd poser
$ mix nerves_hub.device create --identifier poser --tag poser --description "It's a poser device"
$ mix nerves_hub.device cert create poser --signer-cert nerves-hub/poser-signer.cert --signer-key nerves-hub/poser-signer.key --path nerves-hub/
```* Register your new CA with `NervesHub`
```bash
$ mix nerves_hub.ca_certificate register nerves-hub/poser-signer.cert
```Now you should be able to start an IEx session and connect to your local NervesHub
```bash
$ iex -S mix
```Also, you can attempt to connect the poser device to prod or staging envs with `PROD=1` and `STAGING=1`
env vars when starting IEx. Note you'll need to register your CA with each env as well.## SSL Errors
For local dev connections, your poser will need to be using the same CA certificates that NervesHub is using. When you first set this up, copy the CA files from your NervesHub setup into `ssl/dev`
For `staging` and `prod`, the included CA files _should_ work.