Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kirk Ross
    @kirkbross_gitlab
    Isn't everything constrained by the max CPU / RAM of the VM?
    I was hesitant to create new pools in the my existing cluster because I think I tried that before and my $26/month VM became $52.
    It's so easy to make a little tweak and dramatically increase cost.
    Manish Vachharajani
    @mvachhar
    It is, yes, so if your pod is bigger than the CPU and RAM of all nodes, then you won't be to run the pod
    Oh yeah, we got hit with a $230 bill last month because we forgot to shut down a couple small clusters.
    If you delete the old pool and choose the right instance sizes you should be fine though. However, none of the providers really make it easy to see your instantaneous costs.
    Kirk Ross
    @kirkbross_gitlab
    Yeah. They have a projected cost in the billing area, but I don't know how often it updates.
    Manish Vachharajani
    @mvachhar
    A pro tip on creating and deleting pools though is that you have to use kubectl drain to offline nodes manually before deleting a pool, especially the nodes running the master process for k8s. Learned that the hard way :)
    Oh they do, I hadn't noticed that. I'll have to keep an eye on it.
    Kirk Ross
    @kirkbross_gitlab
    Right now I'm running a $26/month VM but my "projected costs" for October are $82.
    Manish Vachharajani
    @mvachhar
    Would have probably saved us $1-2k over the last year :)
    Hmm, is that because of storage, do they give you a break down?
    I'm checking it out now
    Kirk Ross
    @kirkbross_gitlab
    I think because it's factoring in one of my "mistake" VM that I deleted pretty quick.
    Manish Vachharajani
    @mvachhar
    Oh yeah they do, nice.
    Ahh
    That is a really nice feature. I wonder if AWS has something similar. They have a manual calculator, I haven't seen an automated one like the GCP one, but it would be easy to miss in AWS.
    Kirk Ross
    @kirkbross_gitlab
    I want to start setting up my postgres db and I noticed in deploy/styles.tsx the test function k8sTestStyle() has a mockDbName and mockDataPath... is this a functioning db I can read and write to? Not sure how to connect to it, or id I have to do a prod deploy for postgres to work.
    Mark Terrel
    @mterrel
    The postgres db that's deployed by k8sTestStyle is a fully functioning postgres database that should work just fine for development and testing purposes. BUT, it's not deployed in a way that's suitable for production. It does not create any persistent storage, so when you destroy your deployment, you destroy your data too (just like you'd typically want for dev or testing). That style also is able to pre-load data from a .sql file or files, which is what mockDataPath is.
    Right now, for more long-term data and definitely for production, we'd recommend using a database service from one of the major vendors, like Cloud SQL from Google. To use that, you'd create that database service separate from Adapt. (In the future, we'd like to add components for that.) Then there's an example in the Adapt styles.tsx of a Postgres component that just takes the connection & login information for the prod style. If you need some help with that component, I can go into more detail.
    Kirk Ross
    @kirkbross_gitlab
    I created a PostgreSQL instance in my gcloud project. I'm not too worried about having separate testing and prod databases, so I'll just use the one for everything. I'm going to spend a few days doing some Lynda (now Linked In Learning) tutorials on how to connect to it from the app. I also want to learn how to use .env file to store the username and password so they are safe. Once I know how to create, edit and delete records, I'll be at the first rung of the ladder of knowledge :) I installed pgAdmin on my PC so I'll mess with that and see if I can connect, then try to move some of those settings over to the app.
    Manish Vachharajani
    @mvachhar
    Great, let us know if you want some help in how to get that .env variable into Adapt.
    Rahul Saxena
    @rksio_twitter
    “Oh yeah, we got hit with a $230 bill last month because we forgot to shut down a couple small clusters.” — wonder if a “watcher” or “resourcelimiter” attribute might be useful to warn when resource usage continues.
    Mark Terrel
    @mterrel
    That sounds like a great idea. :)
    Omar Suleiman
    @omarxs2
    Hi everyone , I found this channel in docker hub. are you still here guys?
    Manish Vachharajani
    @mvachhar
    Yes we are!
    Omar Suleiman
    @omarxs2
    @mvachhar Hi, I'm trying adaptjs on gcp to auto deploy an app on GKE using trigger on each time i push my code on main branch .. i used your moviedb app to play around .. I copied adapt image from docker hub to gcp .. this is my cloudbuild.yaml and this is the error i got:
    image.png
    image.png
    also, i searched in adaptjs.org but i couldn't find any documentation about canary deployment using adaptjs..
    Manish Vachharajani
    @mvachhar
    So, the problem is that the first time you deploy, you have to use adapt run to create the deployment, from then on you can run adapt update.
    However, the adapt directory that is referenced in the error has to be preserved across runs, either by copying it to and from GCP, or using some other mechanism. Otherwise adapt update will fail.
    In theory, if everything is working you should be able to rerun adapt run from scratch and adapt should adopt existing infrastructure it created, but we don't extensively test this case, and it is easy to have subtle problems with components that cause issues with this.
    So, my suggestion with cloud build is to run a step where you copy /builder/home/.local/share/adapt to GCP after a build, and from GCP before a build. But you have to get the state there first, by doing an adapt run.
    We do have plans to make this easier in the future but have been focusing on some other projects since we've worked around this issue ourselves.
    If you cook up a solution, I'd love to see your cloudbuild.yaml so others can benefit from it.
    Let me know if this helps.