How to build a Ubuntu Packer file for LXC/LXD in HCL? - packer

I have done the tutorial and read the documentation for the LXC builder but I am still confused on how to tell Packer how to use what image.
I can understand the tutorial for Docker but as soon as I change parts that should load Ubuntu and Init the Packerfile with the LXC plugin I sitll get errors.
Majority of tutorials out there seem to be for AWS/Gcloud/Azure and as I learnt from the Docker tutorial your can't really translate stuff and quite a lot of it is in JSON which is becoming deprecated so not much HCL stuff out there.
How would I build a basic LXD/LXC Ubuntu image with Packer?

Related

How can I test my locally stored webpages?

I have my HTML pages locally stored on my Mac. I already bought the domain and the hosting service. There's a way with which I can test these local webpages so that I can see how they render on different devices? I have heard about local server for testing or using devices via USB attached to the PC. Is there not a more standard and unified way to testing them? It can be everything (software, online services, ...) I'm not interested in emulators/simulators.
If you have only html and/or Javascript code:
Open it with your browser, it will be enough
If you have PHP code:
Install a local web-server (Ex: Apache)
If you have MySQL code:
Install a MySQL server
Usually, installing Mamp (or an equivalent for Android/iOS) is enough to do every basic things. It will provide you SQL and PHP server
Hope it helped you
Creating a local server: Node.js and BrowserSync
I've found a very simple way to test webpages (in my case, HTML5 pages) that are saved in PCs memory so that we could test them directly into all the different devices available, without using simulators/emulators.
The solution is creating a local server using two great totally free tools: Node.js and BrowserSync. Before writing this answer, I tried this solution on my own, and I was completely satisfied of the result! You can find the source for this answer at JavaScript Kit.
Here you are the main steps:
Install Node.js (verify if Node.js is correctly installed with the node- v command from the terminal);
Install BrowserSync using npm install -g browser-sync directly from the terminal. Be careful you need root permissions (I simply used sudo npm install -g browser-sync);
Run BrowserSync:
Navigate to your target directory (the one which contain the static files used to create the website, that's the HTML (and CSS) files) using the command line (to make an example, it could be cd folderA/folderB);
Create a local server inside that directory, with browser-sync start --server.
These are the main steps, but you can directly read the solution from the original source I linked some lines before.

FreePascal & OpenShift

any one has experience with Open Shift and install FreePascal as a cartridge?
I found this but I don't know how make it work :
https://github.com/jhadvig/openshift-pascal-cartridge
I want to know what is the instruction of making FreePascal cartridge.
The following command should install that cartridge for you
rhc app create freepascal https://cartreflect-claytondev.rhcloud.com/reflect?github=jhadvig/openshift-pascal-cartridge
Basically since the manifest.yml file does not contain a Source-Url definition, you need to run it through the cartridge reflector as i did above.
Unfortunately that cartridge also does not seem to install correctly. You should leave an "issue" using the issues tab on that cartridge asking if it is ready for production use or not.
If you want to develop your own cartridge, you can read through the cartridge developers guide here: http://openshift.github.io/documentation/oo_cartridge_developers_guide.html

Using travis-ci.org with a pure as3 project

Does anyone know if it is possible to use travis-ci.org for a pure-as3 project (using FlexUnit) ?
Thanks.
This GitHub Travis-CI ActionScript Demo project is a great starting place to get up and running with UnitTesting a Flash project with Travis-CI.
Much like in FlashBuilder the UnitTest suites and libraries are utilizing Flex; however, your project can be 'pure-as3' project. The demo utilizes OSX Travis worker. The Flash Player will be downloaded from the Adobe website at runtime. All build dependencies (flex sdk, flex unit) will be resolved by Maven with flex-mojos
Many of the Flex-Mojos resources are drying up; however, if you are utilizing the Apache-FlexSDK's you'll want to look here for the latest version.
We do not have built in support for ActionScript, but if it's possible to run on Ubuntu, then it should be possible to test on Travis.
You can install any dependencies as part of the build process with apt-get:
before_install:
- sudo apt-get -qq update
- sudo apt-get -qq install some-package another-package
Looking at the FlexUnit docs, it looks like you need a frame buffer available. You may have some luck using xvfb. We have some docs on that, although aimed towards browsers, it may work for you too.

libgdx HTML5 deployment

I've been working with libgdx for 2 days, and I'm starting to get the hang of it.
I'm comfortable with deployment on Android and desktop, but I've got no clue about how to run/debug or deploy the HTML5 version.
When I run as web application, the link gives me an http error 404.
I did what they say on the libgdx wiki, but that ain't working, so, help would be welcome.
BTW, the app's working fine on Android and desktop.
This worked for me:
In Eclipse -- right click on the *-html project. Select "Google" -> "GWT Compile". This will perform a GWT compile on the project, it can take a while so be patient. Once this is completed, I was able to copy the expanded war directory into my tomcat webapps directory. Tomcat was already running, it picked up the change and deployed the game, I was able to load it via localhost:8080/war/ I later renamed the directory (the one in the webapps folder) to something more appropriate for my project.
Good luck.
I ran into this problem for over an hour before realizing that when I selected "run as web application" and eclipse asked me to point to the war directory, I was silly enough to have been selecting the root directory of the project.
Once I went back and pointed to the actual war folder, it ran without issue. Silly I know, but might not be a bad idea to check, esp if anyone is setting this up at 1 am like I am lol.
According to the current date (December 2014), Libgdx now uses gradle and deploying using the mikeys's answer might not work for you. Follow the following guide for the best solution for this problem:
https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline
It's a bit difficult to deploy the app correctly. In the wiki of Libgdx (in google code) you can find in one of the first entries how to deploy and debug the app. The easiest way is to install and configure a Tomcat server, do the steps of the wiki and that's all. If you don't want deploy the app, only test it, you can do it directly from eclipse with the embedded server jetty included on the GWT Sdk. Hope this helps you.

How do I install a program that involves make, configure, and build?

I knew this day would come, so I guess it is here. (P.S. I am on windows XP).
I am trying to use this program here. I installed it fine, but it doesnt seem to work when I type in equations. So I went back to the site and it says I need JRE version 5.0 or above, (check). Then it also says I need dvipng, which I dont think I have.
So I went to the site it tells me to, (here), and I downloaded the most recent one, "dvipng-1.14.tar.gz". I unzipped it and I have it all sitting in one directory.
Ok... now what?
Im afraid I need guidance on exactly how to proceed here. The readme and installation instructions say to run "./configure", then "make", etc, I opened the command prompt and did all that but doesnt recognize. I have never had to build in this way, I always used an IDE for compiling C++ programs that I write myself. (Anyway, why am I even having to make an exe why dont they just make one and let us download that?)
Very confused as to what I need to do here, appreciate some step by step help.
Thank you
Even though Mohammad's problem was solved in the comments, I'll have a go at answering his question:
To run a build system that uses ./configure, you need something that can run shell scripts, as well as the usual suite of unix tools that the script expects, plus a compiler that behaves in the standard sort of way.
The two projects that I know of that do this are cygwin and MSYS. cygwin is aimed at creating a full POSIX environment on windows, while MSYS is an add-on to MinGW that aims to provide just the parts needed to run a ./configure script and build a program.