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
    So if I really care, then I should destroy / clean up everything and start fresh.
    Mark Terrel
    @mterrel
    Yes, unfortunately :/
    Kirk Ross
    @kirkbross_gitlab
    Debating how OCD I wanna be... :)
    Mark Terrel
    @mterrel
    haha I have that debate with myself all the time
    Mark Terrel
    @mterrel
    @kirkbross_gitlab There is one more thing you may want to look at before you make the changes I suggested. Without making any of the suggested changes, you could use the Google Console to add an Ingress that points to the UrlRouter Service. You'd have to manually manage that outside of Adapt because we don't yet have support for Ingress. But the Ingress would give you the stable IP address you need for DNS and you could also use it to enable HTTPS pretty easily too.
    image.png
    Kirk Ross
    @kirkbross_gitlab
    Okay... I'm about to destroy everything and start from scratch. Before I create a static IP I'll try the ingress option.
    is it necessary to run all the adapt commands from the deploy folder? Like adapt destroy app-test2
    Mark Terrel
    @mterrel
    Yes
    Kirk Ross
    @kirkbross_gitlab
    thought so, cool.
    Kirk Ross
    @kirkbross_gitlab
    can I run adapt run k8s-testand then later adapt run k8s-prod ?
    Mark Terrel
    @mterrel
    Yes. Each time you adapt run, it will create a new deployment with a separate set of resources.
    Kirk Ross
    @kirkbross_gitlab
    cool.
    Kirk Ross
    @kirkbross_gitlab
    would you say Adapt is an analog to Amplify for AWS?
    Mark Terrel
    @mterrel
    There's certainly a lot of overlap, yes. Both are trying to make it easier for developers to use and tie together all the pieces needed to create and deploy all the pieces of an application.
    Obviously Amplify is very AWS-specific where we're trying to be completely agnostic of what cloud you're using or to not use a cloud at all or to use multiple clouds at once.
    And of course, Amplify is much more mature than Adapt right now. We're still pretty early.
    Kirk Ross
    @kirkbross_gitlab
    Well, I'm an official Adapter :)
    Mark Terrel
    @mterrel
    Woohoo!!
    Did you get everything working?
    Kirk Ross
    @kirkbross_gitlab
    Yep. Here's my Facebook killer http://wuddit.com/ :D
    all ready to go
    (kidding of course)
    All I did was change the port to 80 and used the existing IP in my A record
    Kirk Ross
    @kirkbross_gitlab
    Although I also created an ingress like you said and that gave me (I think) a static ip which also woks.
    It took a while to generate. It was empty last night for a long time and then I just noticed now that it populated: http://34.95.90.233/
    I could probably use that as my A record too.
    Mark Terrel
    @mterrel
    That's awesome!!
    Congrats!
    Mark Terrel
    @mterrel
    So I'd suggest using the IP of the Ingress and here's why: no matter which type of resource we're talking about, if you delete it and re-create it, you'll likely get a new IP address. So you want to pick the resource that's going to be least likely to be deleted and re-created. As long as you don't delete the Ingress, it can stay around (and keep its IP address) indefinitely. That gives you the flexibility to make changes more freely to the underlying Kubernetes resources, like moving them to a different region or making changes to the size of compute instances in the cluster without losing the IP address.
    Plus, it has some cool additional features like making it super easy to enable HTTPS and handle certificates automagically when you're ready for all that.
    Kirk Ross
    @kirkbross_gitlab
    I'm using the static IP now. Adding some firebase auth now... :)
    Mark Terrel
    @mterrel
    Nice!
    Kirk Ross
    @kirkbross_gitlab
    Okay... so after adding Firebase auth and a few new components, I ran adapt update and got some unscheduled pod errors, saying I lacked resources. So, I enabled autoscaling and it created an additional pod and added a core (I think). Shouldn't the small cluster created with gcloud container clusters create mycluster --enable-ip-alias --machine-type g1-small --disk-size 30 --num-nodes 1 --no-enable-stackdriver-kubernetes be plenty to handle a login page and a single landing page?
    Kirk Ross
    @kirkbross_gitlab
    Side issue: I've been deleting / creating clusters in my experimenting and in one instance I deleted the cluster from my browser. Then I tried adapt destroy foo-bar and it fails with a bunch of errors. (I'm guessing because you can't delete a deployment if the container is gone). I'm not sure how to clear that up.
    Example of one of the errors:
    [17:23:51] Applying changes to environment [failed] [17:23:51] → Command failed with exit code 1: C:\Users\kirkb\AppData\Local\Temp\kubectl-mX3oaO\kubectl.exe --kubeconfig C:\Users\kirkb\AppData\Local\Temp\tmp-G9HsBT\kubeconfig get -o json Service urlrouter-netsvc-66158c624f7fa14b30a66e2ef6fe6b5d
    Mark Terrel
    @mterrel
    For the first question, I'm not really sure. I do know that for that blog, we used the absolute smallest resources that Google recommended. So I wouldn't be totally surprised that it doesn't take much to run it out of juice.
    On the side issue: there is an open issue for that on GitLab. If the cluster is gone, there's not much we can do besides try our hardest to destroy everything, but just ignore the fact that we can't, and go ahead and remove the Adapt deployment. So that's what the open issue recommends is something like adding --force to adapt destroy.
    Does that sound like that does what you want (one --force is available) or is there something different you were hoping for?
    Kirk Ross
    @kirkbross_gitlab
    I haven't tried --force. I just want to be able to run the adapt run k8s-test blah using the same name.
    in my case that's "wuddit-test"
    (in your tutorial it's app-test)
    adapt destroy wuddit-test --force gets unexpected argument --force
    It's not crucial at all... I can rename it
    Manish Vachharajani
    @mvachhar
    Im out of pocket until Tuesday but Mark or I will take a look at the --force issue as soon ad one of us is at a keyboard. I might be able to take a look tonight but no guarantee.
    Kirk Ross
    @kirkbross_gitlab
    I'm all good for now. I deployed with a new name. Really the issue is running adapt destroy after a cluster has been deleted manually outside of adapt.
    If you need I can post the console output.
    Manish Vachharajani
    @mvachhar
    Ok, it looks like your destroy problem is Issue #95 (unboundedsystems/adapt#95) which says that we have to add a --force and a --no-stop option to resolve this and a related case, not that you can just add a --force option to destroy :-). Since you've run in to this, I'll discuss with mark on prioritizing this issue for a fix soon. We'll keep you posted. I'll spare you the hand edit of the adapt config to remove it via text editor as well.
    Unless of course, you really want that extra deployment gone now.