Integrate shopify faucet into shopify stack (#35)
Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75) Co-authored-by: Neeraj <neeraj.rtly@gmail.com> Reviewed-on: cerc-io/testnet-laconicd-stack#35 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
@@ -714,6 +714,123 @@
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>Shopify</summary>
|
||||
|
||||
## Shopify
|
||||
|
||||
* Stack: <https://git.vdb.to/cerc-io/testnet-laconicd-stack/src/branch/main/stack-orchestrator/stacks/laconic-shopify>
|
||||
|
||||
* Source repo: <https://git.vdb.to/cerc-io/shopify>
|
||||
|
||||
* Target dir: `/srv/shopify/laconic-shopify-deployment`
|
||||
|
||||
* Cleanup an existing deployment if required:
|
||||
|
||||
```bash
|
||||
cd /srv/shopify
|
||||
|
||||
# Stop the deployment
|
||||
laconic-so deployment --dir laconic-shopify-deployment stop
|
||||
|
||||
# Remove the deployment dir
|
||||
sudo rm -rf laconic-shopify-deployment
|
||||
|
||||
# Remove the existing spec file
|
||||
rm laconic-shopify-spec.yml
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
* Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack --pull
|
||||
|
||||
# This should clone the testnet-laconicd-stack repo at `/home/dev/cerc/testnet-laconicd-stack`
|
||||
```
|
||||
|
||||
* Clone required repositories:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify setup-repositories --pull
|
||||
|
||||
# This should clone the laconicd repos at `/home/dev/cerc/shopify` and `/home/dev/cerc/laconic-faucet`
|
||||
```
|
||||
|
||||
* Build the container images:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify build-containers --force-rebuild
|
||||
|
||||
# This should create the "cerc/laconic-shopify" and "cerc/laconic-shopify-faucet" Docker images
|
||||
```
|
||||
|
||||
### Deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
cd /srv/shopify
|
||||
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify deploy init --output laconic-shopify-spec.yml
|
||||
```
|
||||
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-shopify deploy create --spec-file laconic-shopify-spec.yml --deployment-dir laconic-shopify-deployment
|
||||
```
|
||||
|
||||
* Inside the `laconic-shopify-deployment` deployment directory, open `config.env` file and set following env variables:
|
||||
|
||||
```bash
|
||||
# Shopify GraphQL URL
|
||||
CERC_SHOPIFY_GRAPHQL_URL='https://6h071x-zw.myshopify.com/admin/api/2024-10/graphql.json'
|
||||
|
||||
# Access token for Shopify API
|
||||
CERC_SHOPIFY_ACCESS_TOKEN=
|
||||
|
||||
# Delay for fetching orders in milliseconds
|
||||
CERC_FETCH_ORDER_DELAY=10000
|
||||
|
||||
# Number of line items per order in Get Orders GraphQL query
|
||||
CERC_ITEMS_PER_ORDER=10
|
||||
|
||||
# Private key of a funded faucet account
|
||||
CERC_FAUCET_KEY=
|
||||
|
||||
# laconicd RPC endpoint
|
||||
CERC_LACONICD_RPC_ENDPOINT='https://laconicd-sapo.laconic.com'
|
||||
|
||||
# laconicd chain id
|
||||
CERC_LACONICD_CHAIN_ID=laconic-testnet-2
|
||||
|
||||
# laconicd address prefix
|
||||
CERC_LACONICD_PREFIX=laconic
|
||||
|
||||
# laconicd gas price
|
||||
CERC_LACONICD_GAS_PRICE=0.001
|
||||
```
|
||||
|
||||
### Start
|
||||
|
||||
* Start the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-shopify-deployment start
|
||||
```
|
||||
|
||||
* Check status:
|
||||
|
||||
```bash
|
||||
# Check logs for faucet and shopify containers
|
||||
laconic-so deployment --dir laconic-shopify-deployment logs shopify -f
|
||||
laconic-so deployment --dir laconic-shopify-deployment logs faucet -f
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>testnet-onboarding-app</summary>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user