Skip to content

Instantly share code, notes, and snippets.

@franTarkenton
Last active September 14, 2023 15:00
Show Gist options
  • Save franTarkenton/bf7fbb00e173466a710c94abdfb6167a to your computer and use it in GitHub Desktop.
Save franTarkenton/bf7fbb00e173466a710c94abdfb6167a to your computer and use it in GitHub Desktop.
Overview of getting started with SMK, as well as how to deploy.

Overview

This is mostly notes to help me with remember what I have to do if I'm creating an SMK app.

  • creating an smk project
  • configuring API Gateway for vanity url
  • deployment using smk deployment

Getting Started

Node

To run SMK you are gonna need to have Node/NPM installed. The following are my notes on best practices for that. Recommendation is to run all the steps in this doc in either linux or WSL.

node installation

Install SMK-CLI

npm install -g @bcgov/smk-cli

Create an SMK Map

smk-cli create smk-demo-arch

In the browser view add the layers for:

  • Indian Reserves
  • Natural Resource Areas
  • MOTI Rest areas

finally Save the map

Create local repo

cd smk-demo-arch
git init
  • commit the existing files

Create gihub Repo

  • Go to github create the repo named smk-demo
  • Add remote / set branch / push
git remote add origin https://github.com/franTarkenton/smk-demo-arch.git
git branch -M main
git push -u origin main

Add the gha deployment files to openshift

overview of instructions here

Files to copy:

  • dockerfile
  • .github directory
  • license
  • code of conduct
  • edit the .github action files sections for PR_REVIEWERS and PR_MENTIONS (bottom of both action files)

Config the API Gateway

  • login to api gateway
  • create namespace
  • create service account
  • record the credentials into a values file


Run init helm chart

  • login to openshift
  • helm repo add smk-helms https://bcgov.github.io/smk-helms/
helm upgrade smk-demo-arch-init smk-helms/smk-init-helm-chart --install \
--values <values file>

Create the secrets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment