Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kakam setup fails on blank aws ubuntu machine #870

Closed
urubatan opened this issue Jun 29, 2024 · 3 comments
Closed

Kakam setup fails on blank aws ubuntu machine #870

urubatan opened this issue Jun 29, 2024 · 3 comments

Comments

@urubatan
Copy link

Sorry if this is a duplicate I searched and didn't find anything similar.
I'm using kamal-1.6.0 with rails-7.1.3.4

While deploying a project to a blank AWS ubuntu machine the command kamal setup fails in two steps:
first it installs docker, then it fails while pushing the image, because it didn't add the user to the docker group (not running as root, but user had sudo permission)
then I manually login to the machine and add the user to the docker group, docker commands work

then it fails while starting traefik, because "docker: open .kamal/env/traefik/traefik.env: no such file or directory"

then I run kamal env push

then the third time kamal setup is executed, it works fine

not sure if this is a duplicate, I didn't find any other similar issues,

My understanding is that kamal setup should do all required steps and setup the remote machines for deployment, and "simply work"

this is my "config/deploy.yml"

service: .....

image: .....

# Deploy to these servers.
servers:
  - ....IP.....

# Credentials for your image host.
registry:
  username: urubatan
  password:
    - KAMAL_REGISTRY_PASSWORD

env:
  clear:
    POSTGRESQL_ADDRESS: ....
    POSTGRESQL_USERNAME:  .....
    POSTGRESQL_PASSWORD:  .....
  secret:
    - RAILS_MASTER_KEY
    
ssh:
  user: ubuntu

traefik:
  args:
    entryPoints.http.address: ":80"
    entryPoints.http.forwardedHeaders.insecure: true
    accesslog: true
    accesslog.format: json    

primary_role: web

builder:
  multiarch: false
  arch: amd64
  context: '.'
@imWildCat
Copy link

because it didn't add the user to the docker group (not running as root, but user had sudo permission)

IMHO this can be done via Infra as Code, like terraform?

@urubatan
Copy link
Author

urubatan commented Jun 30, 2024

It is possible sure, but since Kamal installs docker it should make it work 😅

It installs docker, meaning it knows how to use sudo

If it needs to be done through terraform add it as a dependency

@djmb
Copy link
Collaborator

djmb commented Jan 10, 2025

Closing in favour of #980 as that has more detail

@djmb djmb closed this as completed Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants