Deploy brxM on AWS Elastic Beanstalk

Is it possible and recommended to deploy brxM on AWS Elastic Beanstalk - Service?
If yes, are there any tipps or instructions available available ?

Thx Thomas

Hi Thomas,

Have a look in the ‘bin/deploy’ folder of this repository. It contains a (xinmods specific but easily adjusted) EB ZIP file builder that downloads a tomcat instance and sets up the shared libraries and classpaths as per the Bloomreach documentation (as best as I could find it) I’ve been able to get cms.war and site.war it running on an EB this way.

Let me know if you have any questions~

Cheers,

Marnix

Hi Marnix,

great job!

I have no experience with EB!

Do I only need to add the bin/deploy folder to my project?
Or is there more to do?
I assume I can build my project, like described in the brxM docs and upload the gz-Archive to EB?

Thomas

Hi Thomas,

Yep, I haven’t tried, but I imagine adding those files to your project will be a good start. You’ll need node installed on your machine (it does some variable merging), and have a read through the DEPLOY.md in the documentation folder of the xinmods repo, it should give you an idea of what your deployment configuration json should look like.

You might have to modify the nginx config to suite your own needs.

Unfortunately you’ll have to have separate configurations for each of your configurations because some of the settings (like where to find the database) are hardcoded in the ZIP. But that should be okay hopefully.

Then after that, you should be able to create an EB compatible ZIP with nginx config and the like.

Would love some feedback, it works for me, but would like to know if others find it useful as well.

Cheers,

Marnix

Unforntunately I am developing on a Windows machine, so I can not run the shell script.
I installed a Linux-Subsystem, to get a bash-shell inside IntelliJ, but I am getting the following errors.

fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

TypeError: path must be a string or Buffer
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.<anonymous> (/mnt/d/Developement/git-hippo/osde_4_1/bin/deploy/merge.js:11:24)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)

Hi Thomas,

I haven’t had a chance to test this on Windows unfortuantely. I’m just wondering if you’ve specified the JSON file for the build as the first parameter to the build script, seems like it’s passing undefined into the open function.

The structure of the JSON file is described in deploy.md

Cheers,

Marnix

You are right - I forget to pass the JSON File !

1 Like