-
Notifications
You must be signed in to change notification settings - Fork 40
WIP: Build master with habitat #453
base: master
Are you sure you want to change the base?
Conversation
|
We are aware that technical debt accrued since last revision of
DistrictBuilder about 4 years ago is causing failures. We have submitted a
funding proposal to clear the technical debt and update the installation
documentation. Hopefully these issues will be cleared up before the end of
2017.
============
Dr. Michael P. McDonald
Associate Professor, University of Florida
352-273-2371
www.electproject.org
@ElectProject
…On Fri, Jul 28, 2017 at 12:43 PM, Chris Alfano ***@***.***> wrote:
pip install -r requirements.txt is currently failing, I've made some
progress in ae9d561but I'm not sure to what extent it's app configuration
issues to fix at the python/django layer or environmental issues to be
fixed at the habitat level ye
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<PublicMapping/districtbuilder#453 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBMSZf4It24ys7c0BhI2DcH8yzDLL8Bks5sSg-bgaJpZM4Omh7y>
.
|
Thanks @mcdisc ! I'm aware of the efforts on that front, I was hoping to help get the old version bare-bones deployable on current systems. I'm pretty familiar with tools to provide an exact environment to the application, even with old/unsupported dependencies being needed. I'm not too familiar with the python/django stack though so I'm pretty ignorant of how big the tech debt mountain may be within the app. If anyone can help me get past |
We pounded on this last summer, and we have an incomplete install document
with workarounds that got us part way through the installation until we ran
into errors that appear to require re-engineering of the DistrictBuilder
code. Unfortunately, I am on vacation and do not have access to that
document. I think Micah Altman last looked at this and may be able to share.
============
Dr. Michael P. McDonald
Associate Professor, University of Florida
352-273-2371
www.electproject.org
@ElectProject
…On Fri, Jul 28, 2017 at 1:29 PM, Chris Alfano ***@***.***> wrote:
Thanks @mcdisc <https://github.com/mcdisc> ! I'm aware of the efforts on
that front, I was hoping to help get the old version bare-bones deployable
on current systems. I'm pretty familiar with tools to provide an exact
environment to the application, even with old/unsupported dependencies
being needed. I'm not too familiar with the python/django stack though so
I'm pretty ignorant of how big the tech debt mountain may be within the app.
If anyone can help me get past pip install -r requirements completing
though I'm more confident about being able to handle the rest of the
process. My hope is this work might inspire some developers to play around
as a contingency to funding coming through in a timely manner, and maybe it
can provide a head start if/when it does.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<PublicMapping/districtbuilder#453 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBMSQI2uJ7jryTn4CKMfGH6polwsbBQks5sShp6gaJpZM4Omh7y>
.
|
Progress! I've added a line to the main description that activates the created virtualenv post-build now. More stuff should probably still get done in the build phase, including copying whatever parts of this repo are needed at runtime into |
Currently,
Running
|
The settings issue got sorted out by bumping celery to a newer version, working on a timezone issue that's probably habitat's doing now |
Hey Chris, We sincerely appreciate your efforts here. It is likely that a fair bit of your work will carry over into the technical debt reduction work referenced above. We're a bit resource constrained right now, but would like to lend a hand where we can. With regard to Habitat, we're a bit unfamiliar with it as an organization. From an ongoing maintenance perspective, it is likely that we'd gravitate toward a more vanilla Docker based packaging approach that builds on top of our generic Django container image (at least for the Django/Celery bits). The other supporting services would use official container images (Redis, PostgreSQL, etc.) locally, but then Amazon Web Services equivalents (ElastiCache, RDS) when deployed to a staging/production environment. Not sure how that overlaps with your efforts here, but I just wanted to put that point out there for discussion as early as possible. |
@hectcastro thanks for the note, I'll keep pecking away at this here and there and appreciate any materials you have I might get some clues from. DistrictBuilder is a project I believe is really important, and habitat is a bit of an academic interest for me right now so I want to see if I can bring them together and show what they can do, even if ultimately your team keeps your current direction (totally understandable!) Habitat is a new project from the Chef team, and it's essentially package and application lifecycle management reimagined for the container age. It's well-supported and has been aggressively developed. What's great about it is that it completely uncouples the application from the host environment and deployment topology. Traditional docker tools give you containers that are still anchored to specific operating system distributions, leaving you with a time bomb to defuse as distributions turn over. An application packaged with habitat can be exported to a docker container image, or run on a VM or bare metal just the same... and in every case, on every operating system, for all time the entire stack of code down to the ELF interpreter will be the exactly same until the application gets rebuilt or its plan gets changed. It provides very precise control of the entire dependency chain and gives you both community support for maintaining updates to dependencies and a seamless path to publish arbitrary updates/builds of deps if you need to--no more mixing in random software sources when the official distro builds are missing a bug fix or version bump you need. All build processes as well get automated in an application-centric way that runs in a clean-room guaranteed to be consistent across development environments I'd encourage you to give the commands I listed in the PR description a try and see what it gets you, it will take just a couple minutes |
FYI I switched to working on a branch based on the v2.0 tag in an attempt to find more sanity: https://github.com/themightychris/DistrictBuilder/tree/habitat-v2.0 |
@themightychris advised me on the codeforphilly slack channel on getting this setup. He's missing a tiny bit in the setup instructions up top. Before
This doesn't make sense to me - the imports appear to be valid syntax, aside from the nasty Anyway, I will work this weekend to debug further. |
@msarahan that's where my efforts went off the rails. IIRC that syntax seems to require python 3, and every version of geos uses it, but half the rest of the app melts if you switch from python2 to python3. So, I don't know how it ever worked, but I also have never built a python app and learned most of what I know about PIP trying to make this work |
It does not seem that conda will play as nicely as I had hoped with habitat. Our installer fails to run because of the way that habitat does glibc. It may be possible to patchelf it, but it's not going to be pretty. Our installer is basically a bash script with a binary blob, consisting of many conda packages (each a .tar.bz2 with a particular folder structure). These appear to be getting extracted successfully. However, after they are extracted, the installer tries to run the python executable that it has just extracted to do some more stuff. That's where we bump into the glibc issue. So, we'd need to sort of intercept the installer mid-way to patchelf python. We'd probably also need to end up patchelf'ing any of the compiled libraries that conda provides. I think that's not worth the headache. @themightychris sorry this was a wash. In looking at your requirements.txt file, it seems fragile to update all of the dependencies to the latest version. You may have more luck pinning to older versions for the time being, until DistrictBuilder can be refactored and modernized as necessary to use current versions. |
@hectcastro @mcdisc does anyone know what the last commit of DistrictBuilder that is running online is? I've gotten past environmental issues I think and just gotten down to the list of python deps in master and the v2 tag just being unworkable. It's hard to see how either of those commits could ever get running |
The most recent build to my knowledge is an AWS AMI for Mexico circa 2013.
Micah Altman has a copy of the AMI that was deployed to enable university
students at ITAM to draw federal districts for the state of Mexico.
============
Dr. Michael P. McDonald
Associate Professor, University of Florida
352-273-2371
www.electproject.org
@ElectProject
…On Mon, Aug 28, 2017 at 4:34 PM, Chris Alfano ***@***.***> wrote:
@hectcastro <https://github.com/hectcastro> @mcdisc
<https://github.com/mcdisc> does anyone know what the last commit of
DistrictBuilder that is running online is? I've gotten past environmental
issues I think and just gotten down to the list of python deps in master
and the v2 tag just being unworkable. It's hard to see how either of those
commits could ever get running
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<PublicMapping/districtbuilder#453 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBMSdeYmXB-1JVkyUNth4nJFQlBxj-yks5scyRJgaJpZM4Omh7y>
.
|
Unfortunately, it is unclear what version was most recently used from our perspective (most people involved with those efforts have moved on). I started with Currently, the last Hopefully that gives you a better path forward. I'll try to pick this up again when I have more time. |
I wonder if this (new?) tool might help, just saw some talk of it in the habitat #python channel: https://github.com/ofek/hatch |
On any Linux machine or Mac w/ Docker installed:
First-time setup
Enter studio and build package
Setup app within studio after a successful build or install