Skip to content

Commit c55133a

Browse files
authored
Ignore stack profile for geoip db (#622)
1 parent 228a493 commit c55133a

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

internal/install/install.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,26 +165,24 @@ func writeStackResources(elasticPackagePath *locations.LocationManager) error {
165165

166166
// Install GeoIP database
167167
ingestGeoIPDir := filepath.Join(elasticPackagePath.StackDir(), "ingest-geoip")
168-
169-
ingestGeoIPDefaultDir := filepath.Join(ingestGeoIPDir, "default")
170-
err = os.MkdirAll(ingestGeoIPDefaultDir, 0755)
168+
err = os.MkdirAll(ingestGeoIPDir, 0755)
171169
if err != nil {
172-
return errors.Wrapf(err, "creating directory failed (path: %s)", ingestGeoIPDefaultDir)
170+
return errors.Wrapf(err, "creating directory failed (path: %s)", ingestGeoIPDir)
173171
}
174172

175-
geoIpAsnMmdbPath := filepath.Join(ingestGeoIPDefaultDir, "GeoLite2-ASN.mmdb")
173+
geoIpAsnMmdbPath := filepath.Join(ingestGeoIPDir, "GeoLite2-ASN.mmdb")
176174
err = writeStaticResource(err, geoIpAsnMmdbPath, geoIpAsnMmdb)
177175
if err != nil {
178176
return errors.Wrapf(err, "copying GeoIP ASN database failed (%s)", geoIpAsnMmdbPath)
179177
}
180178

181-
geoIpCityMmdbPath := filepath.Join(ingestGeoIPDefaultDir, "GeoLite2-City.mmdb")
179+
geoIpCityMmdbPath := filepath.Join(ingestGeoIPDir, "GeoLite2-City.mmdb")
182180
err = writeStaticResource(err, geoIpCityMmdbPath, geoIpCityMmdb)
183181
if err != nil {
184182
return errors.Wrapf(err, "copying GeoIP city database failed (%s)", geoIpCityMmdbPath)
185183
}
186184

187-
geoIpCountryMmdbPath := filepath.Join(ingestGeoIPDefaultDir, "GeoLite2-Country.mmdb")
185+
geoIpCountryMmdbPath := filepath.Join(ingestGeoIPDir, "GeoLite2-Country.mmdb")
188186
err = writeStaticResource(err, geoIpCountryMmdbPath, geoIpCountryMmdb)
189187
if err != nil {
190188
return errors.Wrapf(err, "copying GeoIP country database failed (%s)", geoIpCountryMmdbPath)

internal/profile/_static/docker-compose-stack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
- "ELASTIC_PASSWORD=changeme"
1212
volumes:
1313
- "./elasticsearch.config.${STACK_VERSION_VARIANT}.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
14-
- "../../../stack/ingest-geoip/${STACK_VERSION_VARIANT}/:/usr/share/elasticsearch/config/ingest-geoip"
14+
- "../../../stack/ingest-geoip:/usr/share/elasticsearch/config/ingest-geoip"
1515
ports:
1616
- "127.0.0.1:9200:9200"
1717

0 commit comments

Comments
 (0)