Open mscheper opened 2 weeks ago
Hey @mscheper I'll see if I can find the time to update the repo to answer your questions. I must say I have a few things in my private life that prevent me from diving deep. Still I did not want to leave you hanging.
djangoapp
- there may be more but renaming should generally not be an issue as it's the first thing I often do As said: I'm pretty pre-occupied as it is right now, but once I do find the time to update the repo I'll tag you here ;)
Branch issue-1-Updates_required created!
Hoi @two-trick-pony-NL,
I'll see if I can find the time to update the repo to answer your questions. I must say I have a few things in my private life that prevent me from diving deep. Still I did not want to leave you hanging.
I appreciate it.
- For one I think you'll need more permissions on your iAMS user, I am not quite up to date on which ones I used in the past but toy around there and it should work.
Right. I did it this way; it's a bit bruteforce, but it did get me further. Once I get everything working, I'll create a more restrictive policy.
I also had to create a container service, to get past other errors I was getting.
- You could do a search for all the entries to
djangoapp
- there may be more but renaming should generally not be an issue as it's the first thing I often do
Yep, I did that, but I still got this error:
InvalidInputException: Resource with name "djangoapp" does not exist.
{
RespMetadata: {
StatusCode: 400,
RequestID: "ffd909f3-4525-4139-82a5-cfd33acf11af"
},
Message_: "Resource with name \"djangoapp\" does not exist."
}
Command '['lightsailctl', '--plugin', '--input-stdin']' returned non-zero exit status 1.
I even pulled the original repo all over again, from the issue-1-Updates_required branch, and created a new instance, actually calling it djangoapp
this time. But I'm still getting the same error.
I don't know how GitHub is supposed to know which instance to use, though. I didn't enter the IP addresses anywhere in the repo, and I'm pretty sure there's no reference to the instance in the AIM user I created, nor the policy. Can you explain that to me?
- Using access keys is likely not the BEST way, but for me using side projects it is alwasy very convenient (until I outgrow it to a more mature solution)
Makes sense. But would those more mature solutions also work with using GitHub for CI? Which would you suggest I consider?
- The two extra keys in the screenshot allow you to keep the DJANGO secret key and the AWS Service name out of your repository. Else they may stay in the source code and cause a secutiry issue.
Of course. But is this required for the deployment to work, as shown in the steps?
Branch issue-1-Updates_required created!
It doesn't look like there have been any changes yet, though. Is that right?
Also, with the way this repo is set up, to run while developing, would you expect python manage.py runserver
to work? I've set up a venv and installed everything with pip, and created a .env
file with a DJANGO_SECRET_KEY
(which gets read just fine if I type env("DJANGO_SECRET_KEY")
in the python console, after import environ
, etc.), but it still blows up with django.core.exceptions.ImproperlyConfigured: Set the DJANGO_SECRET_KEY environment variable
. I have it set in the shell environment, too.
I followed a link to this project in (your?) Reddit comment, and appreciate you creating it. Unfortunately, though, I haven't managed to get it working.
I'm seeing this in the Building Django action in GitHub:
It's been 18 months since your post, so I assume some things need to be updated, especially since LightSail won't let me set up Django 4.1 any more,
environ
in requirements.txt seems no longer maintained, and I'm seeing deprecation warnings, e.g:I'm going to see what I can work out, but if you plan to update this repo and the README some time soon, it would no doubt make it easier for me. I'm an old hand at Django, but I've always had other people handle ops, CI and deployment. But now, in a new project, I'm trying to manage all that myself, hence websearching and finding your Reddit post.
Feedback about the installation instructions
image
entries in AWS/deploymentconfig.json accordingly, but would this cause problems otherwise?While there are indeed 'plenty of tutorials', more information would be helpful here:
AWS_SERVICE_NAME
DJANGO_SECRET_KEY
Questions
Thanks!