Giter Site home page Giter Site logo

askami's Introduction

askami

anatomy: node.js - slack/bolt based slack application purpose: get information about the atlassian marketplace

  • node dependencies
    • core features
      • npm install @slack/bolt
      • npm install winston
    • optional features
      • npm install pg
      • npm install got
      • npm install url
  • slack permissions
    • add botscope chat:write to allow messages as @askami
    • add botscope chat:write.public to allow messages as @askami w/o membership
    • add botscope commands to enable slash command
  • add slack channel for observing usage
    • create private channel (e.g. askami-observability)
    • add askami app to the channel
  • create askami.env file
    • core features
      • SLACK_SIGNING_SECRET=<obtain-from-slack-app-configuration-page>
      • SLACK_BOT_TOKEN=<obtain-from-slack-app-configuration-page>
      • MARKETPLACE_SERVICE_PROTOCOL=https
      • MARKETPLACE_SERVICE_HOST=marketplace.atlassian.com
      • LOGGER_LEVEL=<level> (error, warn, info, debug)
      • PORT=3001
      • OBSERVABILITY_CHANNEL=<slack-channel-for-usage-monitoring> (created above)
    • optional features
      • AMCACHE_HOST=<obtain-from-service-provider>
      • AMCACHE_PORT=<obtain-from-service-provider>
      • AMCACHE_DB=<obtain-from-service-provider>
      • AMCACHE_USR=<obtain-from-service-provider>
      • AMCACHE_PSW=<obtain-from-service-provider>
  • development: docker image
    • build docker build -t ghcr.io/timit/askami .
    • run docker run -d -p 3000:3000 --env-file /<path>/askami.env -v <path>:/var/log --rm ghcr.io/timit/askami
    • attach docker exec -it <container-id> /bin/sh
    • view logs docker logs --follow <container-id>
  • distribution: docker image (from development machine)
    • create github personal-access-token for pushing to the container registry
      • provide note/name: askami-push
      • (optionally) provide username: askami-push
      • grant read:packages and write:packages permissions
      • provide an expiration date
      • (recommended) store credential in your password store
    • login docker login ghcr.io (prompts for deploy-token username/password)
    • build
      • when building from linux/amd architecture docker build -t ghcr.io/timit/askami .
      • when building from other architecture (i.e mac arm) docker buildx build --platform linux/amd64 -t ghcr.io/timit/askami .
    • push docker push ghcr.io/timit/askami
  • deployment: docker image
    • create github personal-access-token for pulling from the container registry
      • provide note/name: askami-pull
      • (optionally) provide username: askami-pull
      • grant read:packages permissions
      • provide an expiration date
      • (recommended) store credential in your password store
    • attach to askami server ssh -i /<path>/askami.pem [email protected]
    • stop container sudo docker stop <container-id>
    • login sudo docker login ghcr.io (provide username/token created during distribution steps)
    • pull sudo docker pull ghcr.io/timit/askami
    • add config file for docker container initialization /etc/askami.env (standard service config location per https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html)
    • start container sudo docker run -d -p 3000:3000 --env-file /etc/askami.env -v <path>:/var/log --rm ghcr.io/timit/askami
  • monitoring: docker container
    • obtain container-id sudo docker ps -al
    • attach sudo docker exec -it <container-id> /bin/sh
  • tidy up
    • docker system prune --all
    • docker buildx prune --all

askami's People

Contributors

timit avatar

Watchers

 avatar

askami's Issues

total count and pagination not working for "list -applications"

the atlassian marketplace API does not behave consistently across all types. the total count attribute is not available when requesting the applications list:

all other base types return this information, which is required to establish dynamic pagination routines consistent with the API as documented (https://developer.atlassian.com/platform/marketplace/rest/v2/intro/#pagination). the expected attribute is represented as "count" in the json object root of other types, whether they exceed the limit (50) or not:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.