MIRZA SULMAN BAIG PRO
Joined 12/3/2024
MIRZA SULMAN BAIG PRO said over 1 year ago on Kamal Logs :
Please create an episode for AWS CloudWatch Logs. I am having trouble in credentials adding to deploy.yml

MIRZA SULMAN BAIG PRO said about 1 year ago on Marksmith :
Very Very nice. I was tired of trix and anxiously waiting for new editor supporting md. Meanwhile I will implement marksmith. Thanks a lot for the episode.

MIRZA SULMAN BAIG PRO said 12 months ago on Log Bench :
Nice!
Couple of Questions:
1. Can we use it in production logs?
2. How to deploy it with Kamal?
3. How to log Background Jobs especially Solid Queue?

MIRZA SULMAN BAIG PRO said 11 months ago on Password Managers :
I have been using in CD of github 1Password based kamal deployment using https://developer.1password.com/docs/service-accounts/get-started/
name: Deploy to Staging

on:
  push:
    branches: [main]
  workflow_dispatch: # Allows manual triggering

jobs:
  deploy_to_staging:
    runs-on: ubuntu-latest
    env:
      DOCKER_BUILDKIT: 1
      RAILS_ENV: staging
      BUNDLE_WITHOUT: "development test"
      BUNDLE_WITH: tools
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: .ruby-version
          bundler-cache: true

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3
        with:
          platforms: linux/amd64

      - name: Install 1Password CLI
        uses: 1password/install-cli-action@v1

      - name: Set up SSH
        run: |
          mkdir -p ~/.ssh
          echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
          chmod 600 ~/.ssh/id_ed25519
          eval $(ssh-agent -s)
          ssh-add ~/.ssh/id_ed25519
          ssh-keyscan x.x.x.x >> ~/.ssh/known_hosts
        env:
          SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

      - name: Deploy with Kamal
        run: |
          bin/kamal deploy -d staging
        env:
          OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
Kamal secrets
SECRETS=$(kamal secrets fetch --adapter 1password --account ACCOUNT_ID --from VAULT/ITEM KAMAL_REGISTRY_PASSWORD RAILS_MASTER_KEY POSTGRES_PASSWORD HONEYBADGER_API_KEY)

KAMAL_REGISTRY_PASSWORD=$(kamal secrets extract KAMAL_REGISTRY_PASSWORD $SECRETS)
RAILS_MASTER_KEY=$(kamal secrets extract RAILS_MASTER_KEY $SECRETS)
POSTGRES_PASSWORD=$(kamal secrets extract POSTGRES_PASSWORD $SECRETS)
POSTGRES_PASS=$(kamal secrets extract POSTGRES_PASSWORD $SECRETS)
HONEYBADGER_API_KEY=$(kamal secrets extract HONEYBADGER_API_KEY $SECRETS)

I generally save all the codes in 1 item in the vault. I hope this helps everyone


MIRZA SULMAN BAIG PRO said 9 months ago on Extracting Logic into a Gem :
Nice! Thanks for the episode. Loved it!