Fix local environment setup: replication miss-configuration

Previously the pull replication plugin was not working properly (all the
http requests had a http response with status=401 'Unauthorized')
because there was no bearer token defined.

In order to avoid performance issues and clash with the pull replication
plugin, the replication plugin and its configuration has been removed.

Amend the CI/CD urls used to download artefacts.

Change-Id: I2ada4e466216aa5a973565ccc19235e6ff1bfe73
diff --git a/setup_local_env/configs/replication.config b/setup_local_env/configs/replication.config
index 37b1dd4..1c2aac4 100644
--- a/setup_local_env/configs/replication.config
+++ b/setup_local_env/configs/replication.config
@@ -1,13 +1,3 @@
-[remote "Replication"]
-    $REPLICATION_URL
-    push = +refs/*:refs/*
-    mirror = true
-    timeout = 600
-    rescheduleDelay = 15
-    replicationDelay = $REPLICATION_DELAY_SEC
-    createMissingRepositories = true
-    replicateProjectDeletions = true
-    replicateHiddenProjects = true
 [remote "$REPLICA_INSTANCE_ID"]
     $PULL_REPLICATION_URL
     $PULL_REPLICATION_API_URL
@@ -28,4 +18,4 @@
     useCGitClient = false
     consumeStreamEvents = false
     syncRefs="ALL REFS ASYNC"
-    maxApiPayloadSize=40000
\ No newline at end of file
+    maxApiPayloadSize=40000
diff --git a/setup_local_env/configs/secure.config b/setup_local_env/configs/secure.config
new file mode 100644
index 0000000..faeb659
--- /dev/null
+++ b/setup_local_env/configs/secure.config
@@ -0,0 +1,3 @@
+[auth]
+	registerEmailPrivateKey = A3D00Ny0bLW2z7xdInvIf35Q5mDCi5u9o/E=
+	bearertoken = some-bearer-token
diff --git a/setup_local_env/setup.sh b/setup_local_env/setup.sh
index 12a9349..51e8426 100755
--- a/setup_local_env/setup.sh
+++ b/setup_local_env/setup.sh
@@ -614,8 +614,12 @@
 
 echo "Re-deploying configuration files"
 deploy_config_files $GERRIT_1_HOSTNAME $GERRIT_1_HTTPD_PORT $GERRIT_1_SSHD_PORT $GERRIT_2_HOSTNAME $GERRIT_2_HTTPD_PORT $GERRIT_2_SSHD_PORT
+echo "Remove replication plugin from gerrit site 1"
+rm $LOCATION_TEST_SITE_1/plugins/replication.jar
 echo "Starting gerrit site 1"
 $LOCATION_TEST_SITE_1/bin/gerrit.sh restart
+echo "Remove replication plugin from gerrit site 2"
+rm $LOCATION_TEST_SITE_2/plugins/replication.jar
 echo "Starting gerrit site 2"
 $LOCATION_TEST_SITE_2/bin/gerrit.sh restart