Hi <@U06CE9BN604>! I was able to deploy a containe...
# announcements
m
Hi @douwe_maan! I was able to deploy a container image to GitLab registry. Now I pulled this image into a Compute Engine in Google Cloud. When I try to run it:
Copy code
sudo run <http://registry.gitlab.com/xxxxx|registry.gitlab.com/xxxxx> meltano --help
However when I try to run the image, I get an error:
Copy code
Usage: meltano [OPTIONS] COMMAND [ARGS]...
Try "meltano --help" for help.

Error: No such command "meltano"
I believe I'm doing something wrong but I don't know what 😬
d
@murilo_tavolaro_de_nigris The Docker image's entrypoint is already the
meltano
command, so when you run
sudo run <http://registry.gitlab.com/xxxxx|registry.gitlab.com/xxxxx> meltano --help
, you're passing
meltano --help
as arguments to
meltano
, like in
meltano meltano --help
, which is why
meltano
itself is complaining
No such command "meltano"
. You can drop the
meltano
and directly follow the image name with
--help
:
Copy code
sudo run <http://registry.gitlab.com/xxxxx|registry.gitlab.com/xxxxx> --help
I'll update https://meltano.com/docs/containerization.html to make sure that's clear!
m
🤦‍♂️ , thank you!!
Another question, after I merge the branch to master and gitLab CI build the container image into their registry, I was wondering the best way to deploy. 1. I saw GitLab has an integration with GKE to AutoDeploy there 2. Or I could use a simple Compute Engine (but I didn't find any example of script to push the image into a Compute Engine) If I use GKE I'll have to configure a Postgress db first, I imagine. Which option do you recomend @douwe_maan? Is there another way.
d
@murilo_tavolaro_de_nigris With a Docker image, GKE is the more natural fit, and you can definitely use GitLab's integration to get automatic deployments. I haven't set up Meltano on K8s yet myself, though, so I can't give any specific advice. Some users are discussing a Helm chart for K8s in https://gitlab.com/meltano/meltano/-/issues/2149, and I'm sure they're also happy to help you figure this out via Slack (cc @nevin_morgan). Perhaps it's time for a #deployment or #kubernetes channel!
m
Thank you @douwe_maan, I'll try some more here.
Hi @douwe_maan! I hope you're doing well! (I'm back from my holidays and working on putting meltano in production). I've got a few questions though: 1. If I install meltano with postgres, is the project in my local machine also be using the same database as the production one? Or should I just set the URI environment variable to use the sqlite when in my machine? 2. When I build the docker image, does Meltano store the env variables as well? So, if I have sensitive information, like passwords, will it be inside the images? 3. How do I initialize the UI to let it running regardless of my ec2 session? Is this a Linux specifc command? (if yes, I can google it, but I'm not if there is something specific regarding Meltano)
d
@murilo_tavolaro_de_nigris 1. The data in the system database is environment-specific (see https://meltano.com/docs/project.html#system-database), so I'd recommend using the default SQLite setup locally in development, but Postgres in production. 2. No,
.env
is in
.dockerignore
by default (https://gitlab.com/meltano/files-docker/-/blob/master/bundle/.dockerignore#L6), so secrets are excluded from the Docker image. You can provide them externally using Docker or Kubernetes secrets: https://meltano.com/docs/production.html#containerized-meltano-project-6 3. There's nothing specific to Meltano. You'll probably want to use some kind of service manager (https://en.wikipedia.org/wiki/Operating_system_service_management) to make sure
meltano ui
is always running.
m
Thank you!!