Bug 1334414 - Rename pushapkworker into pushapk_scriptworker r=aki
MozReview-Commit-ID: DNAkfKP7Wl2
--- a/manifests/moco-nodes.pp
+++ b/manifests/moco-nodes.pp
@@ -1167,26 +1167,25 @@ node /beetmoverworker-.*\.srv\.releng\..
$beetmoverworker_env = "prod"
$timezone = "UTC"
include toplevel::server::beetmoverscriptworker
}
# Pushapk scriptworkers
node /pushapkworker-.*\.srv\.releng\..*\.mozilla\.com/ {
$aspects = [ 'maximum-security' ]
- $pushapkworker_env = 'prod'
+ $pushapk_scriptworker_env = 'prod'
$timezone = 'UTC'
- include toplevel::server::pushapkworker
+ include toplevel::server::pushapkscriptworker
}
## Loaners
node "jwatkins-1330169.srv.releng.scl3.mozilla.com" {
$aspects = [ 'low-security' ]
include toplevel::server
}
node "dhouse-1330169.srv.releng.scl3.mozilla.com" {
$aspects = [ 'low-security' ]
include toplevel::server
}
-
rename from modules/pushapkworker/manifests/init.pp
rename to modules/pushapk_scriptworker/manifests/init.pp
--- a/modules/pushapkworker/manifests/init.pp
+++ b/modules/pushapk_scriptworker/manifests/init.pp
@@ -1,25 +1,25 @@
-class pushapkworker {
- include pushapkworker::settings
+class pushapk_scriptworker {
+ include pushapk_scriptworker::settings
include dirs::builds
include packages::mozilla::python35
include tweaks::swap_on_instance_storage
include packages::gcc
include packages::make
include packages::libffi
- include pushapkworker::jarsigner_init
- include pushapkworker::mime_types
+ include pushapk_scriptworker::jarsigner_init
+ include pushapk_scriptworker::mime_types
python35::virtualenv {
- $pushapkworker::settings::root:
+ $pushapk_scriptworker::settings::root:
python3 => $packages::mozilla::python35::python3,
require => Class['packages::mozilla::python35'],
- user => $pushapkworker::settings::user,
- group => $pushapkworker::settings::group,
+ user => $pushapk_scriptworker::settings::user,
+ group => $pushapk_scriptworker::settings::group,
mode => 700,
packages => [
'aiohttp==1.1.2',
'arrow==0.8.0',
'async-timeout==1.1.0',
'cffi==1.8.3',
'chardet==2.3.0',
'cryptography==1.5.2',
@@ -52,53 +52,53 @@ class pushapkworker {
'taskcluster==0.3.4',
'uritemplate==0.6',
'virtualenv==15.0.3',
'yarl==0.7.0',
];
}
scriptworker::instance {
- "${pushapkworker::settings::root}":
+ "${pushapk_scriptworker::settings::root}":
instance_name => $module_name,
- basedir => $pushapkworker::settings::root,
- work_dir => $pushapkworker::settings::work_dir,
+ basedir => $pushapk_scriptworker::settings::root,
+ work_dir => $pushapk_scriptworker::settings::work_dir,
- task_script => $pushapkworker::settings::task_script,
+ task_script => $pushapk_scriptworker::settings::task_script,
- username => $pushapkworker::settings::user,
- group => $pushapkworker::settings::group,
+ username => $pushapk_scriptworker::settings::user,
+ group => $pushapk_scriptworker::settings::group,
- taskcluster_client_id => $pushapkworker::settings::taskcluster_client_id,
- taskcluster_access_token => $pushapkworker::settings::taskcluster_access_token,
- worker_group => $pushapkworker::settings::worker_group,
- worker_type => $pushapkworker::settings::worker_type,
+ taskcluster_client_id => $pushapk_scriptworker::settings::taskcluster_client_id,
+ taskcluster_access_token => $pushapk_scriptworker::settings::taskcluster_access_token,
+ worker_group => $pushapk_scriptworker::settings::worker_group,
+ worker_type => $pushapk_scriptworker::settings::worker_type,
# TODO Enable one of the next 3 lines to turn on Chain of Trust (bug 1317783)
sign_chain_of_trust => false,
verify_chain_of_trust => false,
verify_cot_signature => false,
cot_job_type => 'pushapk',
- verbose_logging => $pushapkworker::settings::verbose_logging,
+ verbose_logging => $pushapk_scriptworker::settings::verbose_logging,
}
File {
ensure => present,
mode => 600,
- owner => $pushapkworker::settings::user,
- group => $pushapkworker::settings::group,
+ owner => $pushapk_scriptworker::settings::user,
+ group => $pushapk_scriptworker::settings::group,
show_diff => false,
}
- $google_play_config = $pushapkworker::settings::google_play_config
+ $google_play_config = $pushapk_scriptworker::settings::google_play_config
file {
- $pushapkworker::settings::script_config:
- require => Python35::Virtualenv[$pushapkworker::settings::root],
+ $pushapk_scriptworker::settings::script_config:
+ require => Python35::Virtualenv[$pushapk_scriptworker::settings::root],
content => template("${module_name}/script_config.json.erb"),
show_diff => true;
$google_play_config['aurora']['certificate_target_location']:
content => $google_play_config['aurora']['certificate'];
$google_play_config['beta']['certificate_target_location']:
content => $google_play_config['beta']['certificate'];
rename from modules/pushapkworker/manifests/jarsigner_init.pp
rename to modules/pushapk_scriptworker/manifests/jarsigner_init.pp
--- a/modules/pushapkworker/manifests/jarsigner_init.pp
+++ b/modules/pushapk_scriptworker/manifests/jarsigner_init.pp
@@ -1,35 +1,35 @@
-class pushapkworker::jarsigner_init {
+class pushapk_scriptworker::jarsigner_init {
include ::config
include packages::jdk17
- $nightly = $pushapkworker::settings::jarsigner_nightly_certificate
- $release = $pushapkworker::settings::jarsigner_release_certificate
+ $nightly = $pushapk_scriptworker::settings::jarsigner_nightly_certificate
+ $release = $pushapk_scriptworker::settings::jarsigner_release_certificate
File {
ensure => 'present',
show_diff => false,
}
file {
$nightly:
content => secret('pushapk_scriptworker_nightly_jarsigner_certificate');
$release:
content => secret('pushapk_scriptworker_release_jarsigner_certificate');
}
Java_ks {
ensure => latest,
- target => $pushapkworker::settings::jarsigner_keystore,
- password => $pushapkworker::settings::jarsigner_keystore_password,
+ target => $pushapk_scriptworker::settings::jarsigner_keystore,
+ password => $pushapk_scriptworker::settings::jarsigner_keystore_password,
trustcacerts => true,
}
java_ks {
- $pushapkworker::settings::jarsigner_nightly_certificate_alias:
+ $pushapk_scriptworker::settings::jarsigner_nightly_certificate_alias:
certificate => $nightly;
- $pushapkworker::settings::jarsigner_release_certificate_alias:
+ $pushapk_scriptworker::settings::jarsigner_release_certificate_alias:
certificate => $release;
}
}
rename from modules/pushapkworker/manifests/mime_types.pp
rename to modules/pushapk_scriptworker/manifests/mime_types.pp
--- a/modules/pushapkworker/manifests/mime_types.pp
+++ b/modules/pushapk_scriptworker/manifests/mime_types.pp
@@ -1,9 +1,9 @@
-class pushapkworker::mime_types {
+class pushapk_scriptworker::mime_types {
case $::operatingsystem {
# This file is used by google-api-python-client to make sure it's pushing an APK. It relies on
# https://docs.python.org/3/library/mimetypes.html which needs this file, no matter what disto
# we're on. Without it, google-api-python-client refuses to handle files.
CentOS: {
file { '/etc/mime.types':
mode => '0644',
rename from modules/pushapkworker/manifests/settings.pp
rename to modules/pushapk_scriptworker/manifests/settings.pp
--- a/modules/pushapkworker/manifests/settings.pp
+++ b/modules/pushapk_scriptworker/manifests/settings.pp
@@ -1,9 +1,9 @@
-class pushapkworker::settings {
+class pushapk_scriptworker::settings {
include ::config
include users::builder
$root = $config::scriptworker_root
$_env_configs = {
'dev' => {
worker_group => 'pushapk-v1-dev',
@@ -50,17 +50,17 @@ class pushapkworker::settings {
service_account => secret('pushapk_scriptworker_release_google_play_service_account_prod'),
certificate => secret('pushapk_scriptworker_release_google_play_certificate_prod'),
certificate_target_location => "${root}/release.p12",
},
},
},
}
- $_env_config = $_env_configs[$pushapkworker_env]
+ $_env_config = $_env_configs[$pushapk_scriptworker_env]
$schema_file = "${root}/lib/python3.5/site-packages/pushapkscript/data/pushapk_task_schema.json"
$work_dir = "${root}/work"
$script_config = "${root}/script_config.json"
$task_script = "${root}/bin/pushapkscript"
$user = $users::builder::username
$group = $users::builder::group
rename from modules/pushapkworker/templates/script_config.json.erb
rename to modules/pushapk_scriptworker/templates/script_config.json.erb
--- a/modules/pushapkworker/templates/script_config.json.erb
+++ b/modules/pushapk_scriptworker/templates/script_config.json.erb
@@ -1,27 +1,27 @@
{
- "work_dir": "<%= scope['pushapkworker::settings::work_dir'] %>",
- "schema_file": "<%= scope['pushapkworker::settings::schema_file'] %>",
- "verbose": <%= scope['pushapkworker::settings::verbose_logging'] %>,
+ "work_dir": "<%= scope['pushapk_scriptworker::settings::work_dir'] %>",
+ "schema_file": "<%= scope['pushapk_scriptworker::settings::schema_file'] %>",
+ "verbose": <%= scope['pushapk_scriptworker::settings::verbose_logging'] %>,
"google_play_accounts": {
"aurora": {
"service_account": "<%= @google_play_config['aurora']['service_account'] %>",
"certificate": "<%= @google_play_config['aurora']['certificate_target_location'] %>"
},
"beta": {
"service_account": "<%= @google_play_config['beta']['service_account'] %>",
"certificate": "<%= @google_play_config['beta']['certificate_target_location'] %>"
},
"release": {
"service_account": "<%= @google_play_config['release']['service_account'] %>",
"certificate": "<%= @google_play_config['release']['certificate_target_location'] %>"
}
},
- "jarsigner_key_store": "<%= scope['pushapkworker::settings::jarsigner_keystore'] %>",
+ "jarsigner_key_store": "<%= scope['pushapk_scriptworker::settings::jarsigner_keystore'] %>",
"jarsigner_certificate_aliases": {
- "aurora": "<%= scope['pushapkworker::settings::jarsigner_nightly_certificate_alias'] %>",
- "beta": "<%= scope['pushapkworker::settings::jarsigner_nightly_certificate_alias'] %>",
- "release": "<%= scope['pushapkworker::settings::jarsigner_release_certificate_alias'] %>"
+ "aurora": "<%= scope['pushapk_scriptworker::settings::jarsigner_nightly_certificate_alias'] %>",
+ "beta": "<%= scope['pushapk_scriptworker::settings::jarsigner_nightly_certificate_alias'] %>",
+ "release": "<%= scope['pushapk_scriptworker::settings::jarsigner_release_certificate_alias'] %>"
}
}
rename from modules/toplevel/manifests/server/pushapkworker.pp
rename to modules/toplevel/manifests/server/pushapkscriptworker.pp
--- a/modules/toplevel/manifests/server/pushapkworker.pp
+++ b/modules/toplevel/manifests/server/pushapkscriptworker.pp
@@ -1,7 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-class toplevel::server::pushapkworker inherits toplevel::server {
- include ::pushapkworker
+class toplevel::server::pushapkscriptworker inherits toplevel::server {
+ include ::pushapk_scriptworker
}