DEV Community

ItsASine (Kayla)
ItsASine (Kayla)

Posted on

Pusher Project - Why I'll Never Be Devops

We are now 12 hours into Sunday. The last day before the work week restarts. The last day of finals week at my university. Also, the day of my city's massive marathon (of which I live near the main drag... silly loud healthy people).

And what have I doing? Cursing out AWS. Repeatedly.

My workflow when it comes to AWS is that if something doesn't work, I nuke it and try again. So I've nuked my AWS resources about... 4 times today. This is what I have now:

Blank page with Pusher running
You know what this is? Progress


I initially set up a CodeStar instance, which automagically sets up every part of the build pipeline and even will set a Github repo for you. Then I took on too much too fast and borked that build pipeline. Nuke, try again.

Second instance was trying to get environment variables set up properly. Broke that pipeline, nuke, try again.

Third instance was trying to set up a some of the Elasticbeanstalk project templates myself and try to build off that. Nope, nuked.

Fourth instance was taking that further by thinking I'd try actually understanding the CodeStar tech stack and manually make it all myself. That's terribly painful. Permissions, S3, pipeline, codebuild... yeah, no.

Fifth instance: back to the beginning. Took my default Node Lambda CodeStar fresh build, added Pusher's default JS they have in Getting Started, then tried to build it. Was a little fancy at first which failed, so I deleted that code and rebuilt. Looks like this works now! Though I had to set up this CodeStar repo as a private one since I can't yet figure out how environment variables work, and you all on the Internet aren't getting my secret.


Cost Breakdown thus far

  • Domain name (not used yet) - $12/yr
  • Python Dev Humblebundle so I could get a cheap egghead.io license for their AWS videos - $20
  • AWS student perks and free tier stuff - Free!
  • Pusher default sandbox tier - Free!
  • My entire Sunday - priceless (not really -- I would have been doing chores or Fallout 4)

Stuff still to do

  • An entire front end. It's a blank page.
  • Pretty much an entire back end

Stuff not left to do

  • A deployment stack!
  • Pick a name for the app -- I told my boyfriend that it was a shop where you sell emojis so he named it Shopoji.

Nice to haves

  • Figure out how to pass in info like the secret key at build time so I can open source again
  • Get the DNS settings right to use my domain name
  • Actually read and watch the stuff I bought for Python just to get that egghead.io key

Previous posts

Top comments (5)

Collapse
 
kayis profile image
K

Sounds fun haha.

You need to make smaller steps and prioritize better.

Sure, that CodeStar build pipeline is awesome, but do you really need it?

If you can build/deploy your project from your own machine via command line you can put it into a CI later.

I went like this:

Do I know about Pusher?

No. I need it for the contest, so I have to learn it.

What do I have to learn? Channels, so lets setup a Pusher app and connect to a channel.

Yay it worked and I didn't have to write a single line of back-end code.

What do I need specifically for my project? Presence channels, so lets set this up.

These need server side authentication. So lets set up a Lambda function for this.

etc.

While I took care of being able to set this whole stuff up via CLI my whole deployment process is still done on my local machine.

Collapse
 
itsasine profile image
ItsASine (Kayla)

You probably understand AWS though haha

My thought process was “What’s the thing I did before? I’ll do that so I don’t have to learn even more things in a small amount of time.”

I’ve only ever done little front end projects locally, so tossing the app out to AWS to have them handle things seemed like the path of least resistance.

Though then I got cocky and tried getting too fancy too quick.

But now I have it out there, I can work on it at work on my personal iPad :)

Collapse
 
kayis profile image
K

I'm relieved to read that :)

Collapse
 
avalander profile image
Avalander

Figure out how to pass in info like the secret key at build time so I can open source again

If you're talking about the frontend and are using webpack, you can use the dotenv package and webpack's DefinePlugin to load the key from a configuration file and define it as a global constant when building your sources. Check out how I did it in my project if it sounds interesting.

Collapse
 
itsasine profile image
ItsASine (Kayla)

I’ll look into it! Right now, the front end is a blank page, so that was the next thing to build out.

And I noticed my archive that AWS is using doesn’t recognize emojis as valid Unicode. Boo.