Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Ubuntu 20.04 and make sure braid code works for a migration. #279

Merged
merged 4 commits into from Oct 29, 2021

Conversation

adiroiban
Copy link
Member

@adiroiban adiroiban commented Sep 19, 2021

I have migrated base , t--web and trac to https://twisted-vm.centralus.cloudapp.azure.com/trac/

These are the changes I made

it's an upgrade from ubuntu 16.04 to 20.04

it contains various fixes.

TODO

  • This is using the txacme from my fork... see how to merge the changes.
  • Archive restore is a bit dumb, and if the destination directory already exists it will extact inside it instead of replacing/merging it.. So instead of config/trac-env/files/attachments/ you and up with config/trac-env/files/attachments/attachments
  • There are still many files on dornkirk ...but I don't know if they are used. So maybe just archive them and see later if we need them.
  • See why Trac GitHub login redirect URL is hardcoded to twistedmatrix.org

def cb_got_client(client):
issuingService = AcmeIssuingService(
cert_store=DirectoryStore(certificates),
client=client,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glyph this is using txacme-v2 form my fork

this is the main change that is breaking the txacme API with v2.

I needed to initiate the client outside of the service, so that for example if the URL is not valid, the service is not started.

At the same time, having control over the client makes testing much easier.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just drop txacme entirely and use certbot in webroot mode? That's effectively what we've been doing manually in production lately.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well... txacme-v2 works and is already setup with braid.

I am not -1 on using certbot, but I don't have much time and I would spend the remaining time doing the migration, rather than refactoring braid.

but after the migration we can refactor the code to use certbot.

but the long term plan is to stop using t-web and just use GitHub Pages + GitHub Wiki + Read The Docs for our websites ... and hopefully we can also migrate to GitHub Issues

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, if we don't need to mess around with the configuration, it's fine to use this as-is.

@adiroiban
Copy link
Member Author

This is a common error that I have fixed it by removing lines 719 ...

[twisted-vm.centralus.cloudapp.azure.com] out:   File "/srv/t-names/virtualenv/site-packages/pip/_internal/operations/install/wheel.py", line 719, in _install_wheel
[twisted-vm.centralus.cloudapp.azure.com] out:     assert os.path.exists(pyc_path)
[twisted-vm.centralus.cloudapp.azure.com] out: AssertionError
[twisted-vm.centralus.cloudapp.azure.com] out: 

@adiroiban
Copy link
Member Author

Also, authbind is not working... I am not sure why... I went with setcap for now.

We can look at authbind later.

@twm
Copy link
Contributor

twm commented Oct 29, 2021

Hi @adiroiban, sorry I missed this the first time around. I wish I'd seen this when working up #280; it would have helped. I think that we should merge this for the same reasons as that PR: it's best if master reflects the actual state of dornkirk.

@glyph
Copy link
Contributor

glyph commented Oct 29, 2021

Hi @adiroiban, sorry I missed this the first time around. I wish I'd seen this when working up #280; it would have helped. I think that we should merge this for the same reasons as that PR: it's best if master reflects the actual state of dornkirk.

well… not Dornkirk, any more. That machine is gone :)

@adiroiban
Copy link
Member Author

I am going to merge this.

Note that I am considering the Azure VM migration - Plan B.

For the long term, I hope we can get rid of that VM and move all Twisted infra to SaaS services ...
Migrate Trac t0 GitHub Issues ...
and use something like Netlify to host the presentation website as it support redirection ... while GitHub pages has no support for redirection via the headers.

There is this PR to update the presentation website twisted/twisted.github.io#6
with a demo at https://ioanacristinamarinescu.github.io/twisted.github.io/

@adiroiban adiroiban merged commit deffb8e into master Oct 29, 2021
@adiroiban adiroiban deleted the ubuntu-2004-migration branch October 29, 2021 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants