Commit graph

32 commits

Author SHA1 Message Date
Andy Allan
d6d16dedb9 Simplify ruby installations
Refs #4048

* We don't currently need a specific version suffix on the package names,
  since ubuntu only ships with one ruby version (and newer versions on
  e.g. 23.04 are fine).
* We don't need to explicitly install libruby, since it's pulled in by
  other packages as required.
* Ubuntu again ships a decent enough version of bundler for our needs,
  so we don't need to install it via rubygems.
2023-05-31 17:55:53 +01:00
Andy Allan
75e3227508 Update vagrant provisioning for 22.04
Refs #4048

* geckodriver is now inside the firefox snap package
* the yarnpkg package is completely broken, see
  https://bugs.launchpad.net/ubuntu/+source/node-yarnpkg/+bug/2003697
2023-05-31 15:36:13 +01:00
Tom Hughes
ce256ee661 Merge remote-tracking branch 'upstream/pull/4023' 2023-04-26 18:19:52 +01:00
Andy Allan
7a85ce0c12 Use rails to migrate database for vagrant
This brings the vagrant provisioning script into line with the
installation notes, docker and CI.
2023-04-26 16:36:22 +01:00
Andy Allan
f4651f68e2 Remove apache packages from install instructions and vagrant provisioning
These are unnecessary for development environments, and are not used in
the Fedora instructions nor in the Dockerfile.
2023-04-26 14:23:57 +01:00
Andy Allan
581bf517cb Use bin/yarn consistently for installations
Since rails 7, the `rails yarn:install` command no longer uses
bin/yarn and so a) doesn't detect yarn binaries named "yarnpkg"
(e.g. Ubuntu) and b) doesn't allow us to pass any flags to yarn,
(e.g. "--ignore-engines").

Since we want to avoid making the installation more difficult (by
e.g. installing yarn from other sources, or requiring particular
node versions) we can instead just use our existing bin/yarn script.

The reason Dockerfile did its own thing was to avoid pulling in
big chunks of rails, but bin/yarn is a standalone ruby script.

Fixes #3579
2023-01-11 13:58:54 +00:00
Andy Allan
479c1575e1 Remove tile_for_point SQL functions
This removes both the pl/pgsql version and the shared library version
of the `tile_for_point` SQL function. This function was only used in some
old migrations, and is not required for production usage.

Removing this function simplifies the installation and configuration for
new developers.

These SQL functions are separate from the `tile_for_point` ruby/C function
which is part of the quad_tile gem. This function is still used when
creating and updating database records.

Fixes #3110.
2022-12-07 17:22:50 +00:00
Tom Hughes
12c1d5e6c0 Merge remote-tracking branch 'upstream/pull/3126' 2022-12-03 10:59:14 +00:00
Andy Allan
9809750401 Remove imagemagick from dependencies 2022-03-09 17:18:43 +00:00
Tom Hughes
ddb140f387 Switch to using vips for image processing 2022-03-02 19:44:56 +00:00
Harry Wood
448fd1b3bd Fix vagrant storage.yml config
Tell vagrant to copy the example storage.yml config file into place as per INSTALL.md instructions. Allows the migrations to run.
2022-02-12 00:13:42 +00:00
Tom Hughes
81c3ebe03c Remove xid_to_int4 postgres function
Fixes #3288
2021-08-06 00:15:40 +01:00
Andy Allan
6c5c36deac Automatically enable the btree_gist extension
This simplifies the install instructions. Loading from structure.sql is already handled.
2021-03-10 18:24:36 +00:00
mmd-osm
4e6d729529 Remove /api/0.6/changes endpoint
Also removes sql functions which are only used by this endpoint
2021-02-03 14:06:34 +00:00
Tom Hughes
e9483dcc5d Attempt to modernise vagrant configuration 2020-08-25 20:57:50 +01:00
Tom Hughes
a7781f62cf Update vagrant provision script for switch to selenium 2020-04-22 16:44:53 +01:00
Matt Amos
ced8ac86ab Remove need for shared library PostgreSQL functions
This repo contains code for three functions to be loaded into PostgreSQL as a shared library:

1. `maptile_for_point`, which is used only by the `/changes` API call. This API call is little-used and IMHO should be deprecated and removed. However, even now it's hardly on the hot path for most development activities.
2. `tile_for_point`, which is used only in migrations. At this point, it seems unlikely that anyone will be doing a migration on existing data which would call this function (most developers will be running migrations on an empty database, to set it up).
3. `xid_to_int4`, which is only used for replication using Osmosis and isn't used in the Rails code at all. Hopefully this will be replaced Real Soon Now, but until then it's a quite advanced feature that most developers won't need.

Therefore, this patch proposes to replace the above three shared library functions with SQL implementations of the first two. These are _much_ slower - by a factor of about 30x, however this makes no difference when they're run on a completely empty database. In return, we're able to drop a dependency on the PostgreSQL server development package, and clean a few lines out of the installation instructions.

It's still possible to make and install the shared library functions, and I've included instructions about how to do that - although it shouldn't be necessary for the vast majority of `openstreetmap-website` developers.
2019-10-04 13:25:00 +01:00
Tom Hughes
dc5cdebc29 Create config/settings.local.yml in Vagrant provisioning script 2019-08-08 09:50:13 +01:00
Tom Hughes
2a9346adb0 Make sure phantomjs is installed 2019-08-07 17:29:26 +01:00
Tom Hughes
4efe7cdc10 Fix vagrant provisioning script
Fixes #2343
2019-08-07 17:27:25 +01:00
Tom Hughes
a5735683e9 Avoid bundler 2.x for now
Fixes #2149
2019-02-20 21:46:21 +00:00
Tom Hughes
b4d1a7ad67 Update vagrant config to use Ubuntu 18.04 2018-09-28 19:55:38 +01:00
Tom Hughes
619fa7d802 Update vagrant configuration
Use a common box for all platforms and fix up various
issues with the provisioning script.
2018-05-31 22:53:22 +01:00
Grant Slater
89ba5eab46 Switch vagrant Ubuntu Trusty -> Xenial 2017-01-03 12:42:35 +00:00
Tom Hughes
8fd70ff44f Make vagrant provision script stop on error 2016-03-28 22:45:20 +01:00
Victor Grousset
1efbcc3ff4 Vagrant: Fix locale setup problem
Because dozens of red locale errors during provisioning are scary
2015-12-31 01:22:11 +01:00
Victor Grousset
fb6830dbb2 Update vagrant provision script with current install commands
From INSTALL.md
2015-12-31 00:31:44 +01:00
Tom Hughes
0546ebb7b0 Upgrade vagrant config to use Ubuntu 14.04
This uses the sputnik13/trusty64 image rather then the official
ubuntu/trusty64 image in order to get libvirt provider support as
wall as virtualbox provider support.
2015-05-31 14:55:32 +01:00
Tom Hughes
14d4b9206c Fix vagrant to install all thee 3GL functions 2015-05-07 23:13:07 +01:00
Amir Wilf
103ba7977f Vagrant deploy works
Creating extension btree_gist for test DB 'osm_test'
2015-01-18 14:14:53 +02:00
Matt Amos
581d871827 Migrate the database on vagrant up.
Also fix the provisioning script so that it runs correctly when
the VM is upped, regardless of whether it's a clean install or
an 'up' of a previously halted VM.
2014-03-08 11:33:52 +00:00
Matt Amos
3c1371adaf Move vagrant provisioning script to a better location. 2014-02-26 11:35:43 +00:00