1. 09 Sep, 2021 3 commits
  2. 11 Aug, 2021 3 commits
  3. 10 Aug, 2021 1 commit
  4. 30 Jun, 2021 3 commits
  5. 22 May, 2021 11 commits
    • Addshore's avatar
      mwdd: Suggest current dir if it looks like MW in the wizard · 18b92219
      Addshore authored
      Bug: T282351
      Change-Id: Ieebd4ab9e8c1ecff196b4a5a7608734d4011ec6b
      18b92219
    • Addshore's avatar
      mwdd: Add mysql-replia · 050530b0
      Addshore authored and Addshore's avatar Addshore committed
      Bug: T282332
      Change-Id: Ied37fb9f4967b50aa41015ca27cd368ab0cf7c6b
      050530b0
    • Addshore's avatar
      mwdd: Use newer fpm & apache images for mediawiki · c3600271
      Addshore authored
      Still need to provide a way to override the image versions!
      
      Bug: T283404
      Change-Id: Iee5b643e4f004b9200cccf68004eab3a6dbf1279
      c3600271
    • Addshore's avatar
      mwdd: Fix phpunit running & output (no --wiki) · e7f91c0a
      Addshore authored
      I597ed2b5666f4214173609f7e77e23dbc4fd81ae
      removed the --wiki option for phpunit.php
      as part of T90875
      
      mwdd in mwcli was passing --wiki, but now doesn't
      need to bother.
      
      This also removes some debug output that was accidently
      merged.
      
      The phpunit command might need another iteration in the
      future as the wiki decision topic is still open
      
      Change-Id: I97410b1327c91bdb00a3a3b63515de4057b36b55
      e7f91c0a
    • Addshore's avatar
      mwdd: Allow users to choose http or ssh for clones · 56bfa18e
      Addshore authored
      Bug: T282354
      Change-Id: If7a1f622a4b692d6e4d531ee2bf285d16770aab5
      56bfa18e
    • Addshore's avatar
      mwdd: If we create a settings file, and vector exists, load it! · 25b3892f
      Addshore authored and Addshore's avatar Addshore committed
      Bug: T282357
      Change-Id: Id503e8942b2e43d61b4cee73d102ae2395f06156
      25b3892f
    • Addshore's avatar
      mwdd: Use TTY for almost all command execution · 803b6ec8
      Addshore authored and Addshore's avatar Addshore committed
      This means all output is now streamed which is nice.
      The only non TTY execution is for a command where we
      only care about the exit code and don't want to bother
      the user with the output anyway!
      
      Bug: T282375
      Change-Id: I34edbb9a210e4045e47091087bfea1e410a172ac
      803b6ec8
    • Addshore's avatar
      mwdd: mw phpunit & composer, use "correct" working dir · 96454bf4
      Addshore authored and Addshore's avatar Addshore committed
      This means that when these commands are used on the host
      system in a directory such as "skins/Vector", then working
      dir used with docker will reflect this.
      
      This allows composer commands to be used on sub repos, like
      skins and extensions, as well as for phpunit tests to easily
      be run when in other directories with auto completion of paths
      that just works.
      
      This does NOT allow users to use these commands when outside of
      the expected MediaWiki directory.
      This is out of scope for this patch (but might be something to
      consider in the future)
      
      Bug: T282350
      Change-Id: Id5fb148116bb3346f42867af2140933619f9bf2f
      96454bf4
    • Addshore's avatar
      mwdd: Allow choosing mediawiki phpunit user · 0bb39ff1
      Addshore authored and Addshore's avatar Addshore committed
      Change-Id: I8749ebae02ed5853f3ea041b460b4641176e702b
      0bb39ff1
    • Addshore's avatar
      mwdd: composer install & mediawiki composer command · 531fa275
      Addshore authored and Addshore's avatar Addshore committed
      Will still need to aim to:
       - Make use of composer cache
       - Make working in different directories nice!
      
      Change-Id: If96edd73f60aad1757a8ec67512f2ad97e4f5c7a
      531fa275
    • Addshore's avatar
      mwdd: postgres support · f30460e3
      Addshore authored and Addshore's avatar Addshore committed
      Minimal postgres support.
      This includes basic autodetection of which of the provided db types
      a site is hosted on.
      
      Change-Id: I43bf349200eada2957591b160eb372c3a165c030
      f30460e3
  6. 18 May, 2021 1 commit
    • Addshore's avatar
      mwdd: Wizard to guide you through env setup · 7243f0ed
      Addshore authored and Addshore's avatar Addshore committed
      This includes:
       - Prompting the user to pick a PORT for the mwdd env
       - Prompting the user to pick a MW directory if not set
       - Clone of MediaWiki and optionally Vector
       - Ability to do a shallow clone for speed
       - Ability to clone from Github and switch to Gerrit
      
      This also leaves some TODOs around the place:
       - Allow the user to choose if the remotes end up on https or ssh
       - Allow cloning async for more speed
       - Allow the user to get more skins or extensions?
       - Auto detection of MW directory
       - Check if git is even installed
      
      And leaves 1 clear next step to make initial setup quite
      slick, this being do an initial composer install if
      MW determines that it needs it (will be done in a followup)
      
      Change-Id: Id58e45c26fed77a06226b081f6248d5f27a234b6
      7243f0ed
  7. 12 May, 2021 7 commits
    • Addshore's avatar
      mwdd: Make mediawiki installation more stable · a8453bc0
      Addshore authored and Addshore's avatar Addshore committed
      Change summary:
       - No longer have mediawiki writing a LS.php file with the wrong
         permissions.
       - Add a check to make sure a correct looking LS.php exists before
         allowing install via mwdd.
       - If NO LS.php files exists at all, then create one for the user.
       - If a LS.php exists, but doesn't have our shim, tell the user.
       - Use a nice server option when installing so the output makes sense
         to the user (rather than just saying localhost)
       - Switch from arguments to flags for mediawiki install
      
      This includes some small refactoring and additions to the mediawiki
      package which is used by both the docker and mwdd command.
      
      Change-Id: I2253730996c2969e775d3e77cf376cb1ebd67363
      a8453bc0
    • Addshore's avatar
      mwdd: mediawiki exec command can be run as system user · 54616941
      Addshore authored and Addshore's avatar Addshore committed
      This means that users have the choice of using their user,
      if they want to touch files mounted from their system.
      Or they can also choose "root" if they want to do other things,
      like poke around packages etc.
      
      Change-Id: I12d3d3196ae28d3b42e4f41b6e9e00a99eb4a826
      54616941
    • Addshore's avatar
      mwdd: mediawiki exec command · fb3a7aec
      Addshore authored and Addshore's avatar Addshore committed
      Allows easy command execution in the mediawiki container
      
      Change-Id: I0d053a1c655da5783b3c3a9d49b3f0052975c21d
      fb3a7aec
    • Addshore's avatar
      mwdd: Initial phpunit command · 2ac80947
      Addshore authored and Addshore's avatar Addshore committed
      This can be tested with a command such as:
      
      ./dev.sh mwdd mediawiki phpunit \
      /var/www/html/w/tests/phpunit/unit/includes/FormOptionsTest.php
      
      This uses the docker SDK directly to allow for easy passthrough
      of stdin and out for commands.
      This similar pattern will be used for further CLI interaction
      in mwdd.
      
      The phpunit command will also be worked on in further patches, including:
       - Clever things to do with directories (and maybe path completion?)
       - Ability to run on different --wikis
      
      Change-Id: I4ca04705ba584e3eb241bd75e33e3530305fbf82
      2ac80947
    • Addshore's avatar
      mwdd: Implement mediawiki & mysql suspend & resume commands · 5aa3c5f9
      Addshore authored and Addshore's avatar Addshore committed
      Bug: T253313
      Change-Id: I70d7fc4552d9de9b2386335c880644d0ab274af0
      5aa3c5f9
    • Addshore's avatar
      mwdd: Implement nice destroy commands for individual services · 77f36074
      Addshore authored and Addshore's avatar Addshore committed
      These commands now destroy the containers and volumes of the
      specific service being interacted with.
      Prior to this the mediawiki destroy command would just run
      down on the whole docker-compose setup (as it was the only service).
      But now we need to be a little more selective.
      
      docker-compose doesn't provide commands to do all of this out of
      the box, which is why a docker command is needed to destroy specific
      named volumes for the services.
      
      Bug: T253313
      Change-Id: I8a861978894dd0fe10ffbcadc73314d64138ddd3
      77f36074
    • Addshore's avatar
      mwdd: Enable installing with mariadb · 38e0b4a1
      Addshore authored and Addshore's avatar Addshore committed
      This adds the logic for the mysql service that for now
      just uses a mariadb image from docker hub.
      Eventually a followup will come to allow custom images to be used here.
      
      Verified in github actions on addshore fork
      https://github.com/addshore/mwcli/actions/runs/780426092
      You can see the steps needed to test this out in the test there.
      
      Assuming you have mediawiki, composer installed with the correct settings
      file, then:
      - mwcli mwdd create
      - mwcli mwdd mysql create
      - mwcli mwdd mediawiki install somesite mysql
      
      Really should figure out how to best maintain the docs for this soon.
      Vuepress perhaps?
      
      Bug: T253313
      Change-Id: I04b56065757e0fad21d85cd76b6624e7ea86ebde
      38e0b4a1
  8. 29 Apr, 2021 1 commit
    • Addshore's avatar
      mwdd: Installing with sqlite · 992f06bd
      Addshore authored
      This is a feature from mediawiki-docker that makes more
      sense now that mwdd can be flexible and have any number of
      services running / not running at a given time.
      
      This means that the minimum setup is now the base + mediawiki.
      MySQL things will be added after.
      
      Includes most of the LocalSettings stuff used in mwdd
      (though it isn't all actively used here yet)
      
      Includes addition of a custom special page to allow users
      to easily see the status of some dev env related services
      though not all of those services exist yet.
      
      MySQL support will be added in a follow up patch.
      
      This code was verified on github actions on addshores fork
      https://github.com/addshore/mwcli/actions/runs/780347275
      You can see the .github workflow there to see how to test this
      (As docs have not been added to this repo yet)
      
      Bug: T253313
      Change-Id: I7d1a66dd96b293d3fe3d6b371212e34018872a49
      992f06bd
  9. 03 Apr, 2021 1 commit
    • Addshore's avatar
      mwdd: mediawiki create & destroy. · 2a33a8c1
      Addshore authored and Addshore's avatar Addshore committed
      Working starters for mwdd solution with implemented create and
      destroy commands.
      
      Change-Id: I84b000c0c1d0e3ee873e1a755476c25bda693167
      2a33a8c1
  10. 19 Mar, 2021 1 commit
    • Addshore's avatar
      mwdd: Introduce framework and empty commands · 438b2ba3
      Addshore authored
      Written as a separate commit so that the diff is easier
      to look at.
      This introduces the basic set of files and commands that
      will be used, without any real logic.
      That will follow in future commits.
      
      Change-Id: I11f80c9c11c4d9f7045838be9a406f7e5acd3ffe
      438b2ba3