1

I have a Rasperry Pi 1 Model A. I want to use it on a hobby project that will require me to have lots of dev/test cycles where I:

  1. Write some code in a higher-level language (Scala; but could be anything like Python, etc.); then
  2. Deploy the executable (which runs as a daemon service at startup) and an OS like Ubuntu Server to some memory/drive device; then
  3. Power on the Raspberry Pi (which in turn starts the OS/startup service on the device); then
  4. Test functionality; then
  5. Rinse and repeat

I'm wondering what my options are regarding the memory/drive. Cheaper is better, but I would prefer 4GB at minimum (1GB for OS, 1 for JVM and 2+ GB for service/executable/app), but could live with just 2.

This is my first Raspberry Pi project so I'm feeling a little overwhelmed with options. I'm also unsure of whether I will need to re-deploy the Ubuntu OS to the memory/drive on each dev/test cycle or if there's a way to install the OS one time and then just deploy new service/executable versions on each iteration.

Thanks in advance for any-and-all help!

5
  • 1
    not having a network interface is pretty limiting.. I would consider using a pi zero W for the dev cycle even if I were deploying an A at the end.
    – lossleader
    Commented Aug 25, 2017 at 10:40
  • 1
    Thanks @lossleader (+1) - I'm OK with limitations so long as I can define the dev/test cycle (at this time I can't change the pi model I'm using, I'm stuck with it :-/ ).
    – smeeb
    Commented Aug 25, 2017 at 13:06
  • can you add details of your intended dev environment? I.e. an x86 that you want to run linux or with enough resources to run a virtualized linux, and a preferred IDE?
    – lossleader
    Commented Aug 25, 2017 at 18:26
  • Dev environment is just my Mac running a JVM. I have automated unit tests that can verify correctness for most things (including mocking GPIO pins, etc.) but even with unit tests I'm definitely going to have to test the service running on an actual rpi since it will be interacting with things in the outside world that. But basically I just need to know what my options are as far as installing Ubuntu on my rpi so that Ubuntu starts up the second power is supplied to the chipset. I can figure out how to install my app and its Linux dependencies once I figure out the Ubuntu part. Thanks!
    – smeeb
    Commented Aug 25, 2017 at 22:32
  • you can't run ubuntu distributions on arm6, is raspbian a problem? You also need to modify fs images to add your boot time finding/setup of the app. That is easiest from the actual pi over ssh. From an x86 is a bit more limited but at least it is similar and shares the same set of available FSes if it is a linux kernel (in a vm).
    – lossleader
    Commented Aug 26, 2017 at 12:04

3 Answers 3

1

If you are looking for a testing platform, you should ideally use a bare bone window manager(like i3) to allow for best ram allotment to the JVM and application. Otherwise I would recommend looking at a lighter OS other than Ubuntu. For the repeating test problem, you can initialize a script to look withing a folder on a flash drive and just update the files within the flash drive.

2
  • Thanks @Enan (+1) but the root of my question is: how do I install Ubuntu (and subsequently my app stack such as JVM, linux packages, etc.) on a device so that the rpi installs it at runtime. Surely, we can't expect the rpi to INSTALL an OS each and every time it gets powered on... right?!
    – smeeb
    Commented Aug 26, 2017 at 18:00
  • well you could make a live usb and use noobs, I think< to boot from it and launch the jvm. Or you can have ubuntu as a system image that you boot to. Commented Aug 26, 2017 at 20:17
1

You might want to look at resin.io. They offer docker based raspberry pi os that you can install on your pi as a one off - then deploy and deploy your application by building a docker image which gets pushed to the pi - no need to reboot the pi or even touch it after the initial install, everything can be done over the network.

The basic workflow they offer is

  1. dev locally, run any local tests or anything else you can do on your host.
  2. use git to commit your code locally
  3. use git to push to a remote on their servers

Then they build a docker image with your application in it, and push that to your pi restarting the container all automatically.

They even offer a local dev loop where you can build the docker image locally and push it directly to the pi.

0

Looks like I need to:

  1. Use a tool like Etcher to burn a Raspbian image to an SD card
  2. Then plug the SD card into my pi
  3. Connect a monitor and keyboard to my pi
  4. Power the pi on
  5. Install Raspbian manually
  6. Provision the pi manually (run apt-get, install my service/executable, etc.)
  7. And now I can power the pi on/off like a normally-provisioned *nix machine
2
  • Why not develop on a Pi3?
    – joan
    Commented Aug 30, 2017 at 21:27
  • Because I dont have a dang pi3. Y'all keep recommending that like these things just fall from the sky for free.
    – smeeb
    Commented Aug 31, 2017 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.