Bad (or at least uninformed due to unclear requirements) design decisions lead to somewhat perplexing (and above all, frustrating) problems down the line...

Here I am, wrote a cli client for event bus subscription, and since EC2 is eqv to Docker, had to fix the main function to keep it alive - now the deploy stage on the ci/cd pipeline fails due to startup script timing out. But why tho?

I’m not really sure whether I should’ve designed this differently from the get-go or whether my build and deploy configs don’t match anymore due to recent changes and I should figure out what’s wrong with them... or both.

Bottom line is: I have no idea what I’m doing.

  • 0
    sudo apt-get install apache2
  • 1
    @HiFiWiFiSciFi *yum, because Amazon Linux (basically CentOS RHEL6) .... but umm, care to elaborate?
  • 0
    @100110111 I’ve done this on AWS EC2 Ubuntu 20 in the last 36 hours.
  • 1
    @HiFiWiFiSciFi huh? So what was your problem? I fail to see what apache2 has to do with anything in this context
  • 0
    @100110111 Ok, lets back up... what kind of code are you trying to run an this AWS EC2?
  • 1
    @HiFiWiFiSciFi it’s a dotnet core cli app in F# which is just supposed to stay alive in there and listen for events in an Azure Service Bus topic as subscriber
  • 1
    @100110111 I'll be honest that's all greek to me.

    But like... this is why you won't find me trying to write environmentless apps on Windows and them publishing them to Linux.

    It's just... unnatural. Can it work? Sure. Can it even work well sometimes? Sure. Do more than about 4 people on the planet actually understand how all that is happening? No, no they don't.

    I'd have written a Node daemon and run it with PM2 for a persistent listener. Or hell, depending on the job maybe I'd still use PHP on a cron job.

    IDK, I've mostly just been joking at how I constantly watch devs get lost, not with coding, but with setting up their code to run anywhere but their local.

    And the idea of that, as a server cowboy is foreign to me and ironic.

    Anyway, I hope you figure out the exceptionally complex code publishing workflow you've set yourself up with.
  • 0
    @100110111 Some maybe actual advice...

    Make sure your Security Group for that EC2 has the right ports open? Add an inbound rule for HTTPS on 443?

    I always forget that shit until something breaks.
  • 0
    Yup, now it is confirmed. I am very stoopid. I mean ofc the startup script times out because the dotnet exec was running on fg and never disowed. Why did I not realize it earlier?
Add Comment