User:Icyflame/Server Logs

From Metakgp Wiki
Jump to navigation Jump to search

A collection of the commands I have run on the server to do various things.

2020-03-03: Upgrading Mediawiki 1.33 => 1.34

Upgrade PR: https://github.com/metakgp/metakgp-wiki/pull/78

After the upgrade, I ran the maintenance script. Output looked fine, the wiki is working as it normally does.

root@metakgp-blr:~/metakgp-wiki# docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.prod.yml exec php /srv/mediawiki/maintenance/update.php --quick
[04-Mar-2020 14:00:37 UTC] PHP Warning:  Module 'apcu' already loaded in Unknown on line 0
MediaWiki 1.34.0 Updater

Your composer.lock file is up to date with current dependencies!
Going to run database updates for metakgp_wiki_db
Depending on the size of your database this may take a while!
Turning off Content Handler DB fields for this part of upgrade.
...have ipb_id field in ipblocks table.
...have ipb_expiry field in ipblocks table.
...already have interwiki table
...indexes seem up to 20031107 standards.
...have rc_type field in recentchanges table.
...index new_name_timestamp already set on recentchanges table.
...have user_real_name field in user table.
...querycache table already exists.
...objectcache table already exists.
...categorylinks table already exists.
...have pagelinks; skipping old links table updates
...il_from OK
...have rc_ip field in recentchanges table.
...index PRIMARY already set on image table.
...have rc_id field in recentchanges table.
...have rc_patrolled field in recentchanges table.
...logging table already exists.
...have user_token field in user table.
...have wl_notificationtimestamp field in watchlist table.
...watchlist talk page rows already present.
...user table does not contain user_emailauthenticationtimestamp field.
...page table already exists.
...have log_params field in logging table.
...logging table has correct log_title encoding.
...have ar_rev_id field in archive table.
...have page_len field in page table.
...revision table does not contain inverse_timestamp field.
...have rev_text_id field in revision table.
...have rev_deleted field in revision table.
...have img_width field in image table.
...have img_metadata field in image table.
...have user_email_token field in user table.
...have ar_text_id field in archive table.
...page_namespace is already a full int (int(11)).
...ar_namespace is already a full int (int(11)).
...rc_namespace is already a full int (int(11)).
...wl_namespace is already a full int (int(11)).
...qc_namespace is already a full int (int(11)).
...log_namespace is already a full int (int(11)).
...have img_media_type field in image table.
...already have pagelinks table.
...image table does not contain img_type field.
...already have unique user_name index.
...user_groups table exists and is in current format.
...have ss_total_pages field in site_stats table.
...user_newtalk table already exists.
...have iw_trans field in interwiki table.
...wl_notificationtimestamp is already nullable.
...index times already set on logging table.
...have ipb_range_start field in ipblocks table.
...no page_random rows needed to be set
...have user_registration field in user table.
...templatelinks table already exists
...externallinks table already exists.
...job table already exists.
...have ss_images field in site_stats table.
...langlinks table already exists.
...querycache_info table already exists.
...filearchive table already exists.
...have ipb_anon_only field in ipblocks table.
...have user_newpass_time field in user table.
...redirect table already exists.
...querycachetwo table already exists.
...have ipb_enable_autoblock field in ipblocks table.
...index pl_namespace on table pagelinks includes field pl_from.
...index tl_namespace on table templatelinks includes field tl_from.
...index il_to on table imagelinks includes field il_from.
...have rc_old_len field in recentchanges table.
...have user_editcount field in user table.
...page_restrictions table already exists.
...have log_id field in logging table.
...have rev_parent_id field in revision table.
...have pr_id field in page_restrictions table.
...have rev_len field in revision table.
...have rc_deleted field in recentchanges table.
...have log_deleted field in logging table.
...have ar_deleted field in archive table.
...have ipb_deleted field in ipblocks table.
...have fa_deleted field in filearchive table.
...have ar_len field in archive table.
...have ipb_block_email field in ipblocks table.
...index cl_sortkey on table categorylinks includes field cl_from.
...have oi_metadata field in oldimage table.
...have ar_page_id field in archive table.
...have img_sha1 field in image table.
...protected_titles table already exists.
...page_props table already exists.
...updatelog table already exists.
...category table already exists.
...category table already populated.
...have ar_parent_id field in archive table.
...have user_last_timestamp field in user_newtalk table.
...protected_titles table has correct pt_title encoding.
...have ss_active_users field in site_stats table.
...ss_active_users user count set...
...have ipb_allow_usertalk field in ipblocks table.
...change_tag table already exists.
...user_properties table already exists.
...log_search table already exists.
...l10n_cache table already exists.
...ct_rc_id key doesn't exist.
...have rd_interwiki field in redirect table.
...*_mime_minor fields are already long enough.
...iwlinks table already exists.
...index iwl_prefix_title_from already set on iwlinks table.
...have ul_value field in updatelog table.
...have iw_api field in interwiki table.
...iwl_prefix key doesn't exist.
...have cl_collation field in categorylinks table.
...categorylinks up-to-date.
...module_deps table already exists.
...ar_page_revid key doesn't exist.
...skipping index ar_revid because index ar_revid_uniq already set on archive table.
...ll_lang is up-to-date.
...user_last_timestamp is already nullable.
...index user_email already set on user table.
...up_property in table user_properties already modified by patch patch-up_property.sql.
...uploadstash table already exists.
...user_former_groups table already exists.
...have rev_sha1 field in revision table.
...batch conversion of user_options: nothing to migrate. done.
...user table does not contain user_options field.
...have ar_sha1 field in archive table.
...index page_redirect_namespace_len already set on page table.
...have us_chunk_inx field in uploadstash table.
...have job_timestamp field in job table.
...index page_user_timestamp already set on revision table.
...have ipb_parent_block_id field in ipblocks table.
...index ipb_parent_block_id already set on ipblocks table.
...category table does not contain cat_hidden field.
...have rev_content_format field in revision table.
...have rev_content_model field in revision table.
...have ar_content_format field in archive table.
...have ar_content_model field in archive table.
...have page_content_model field in page table.
Content Handler DB fields should be usable now.
...site_stats table does not contain ss_admins field.
...recentchanges table does not contain rc_moved_to_title field.
...sites table already exists.
...have fa_sha1 field in filearchive table.
...have job_token field in job table.
...have job_attempts field in job table.
...have us_props field in uploadstash table.
...ug_group in table user_groups already modified by patch patch-ug_group-length-increase-255.sql.
...ufg_group in table user_former_groups already modified by patch patch-ufg_group-length-increase-255.sql.
...index pp_propname_page already set on page_props table.
...index img_media_mime already set on image table.
...iwl_prefix_title_from index is already non-UNIQUE.
...index iwl_prefix_from_title already set on iwlinks table.
...have ar_id field in archive table.
...have el_id field in externallinks table.
...have rc_source field in recentchanges table.
...have page_links_updated field in page table.
...have user_password_expires field in user table.
...have pp_sortkey field in page_props table.
...recentchanges table does not contain rc_cur_time field.
...index wl_user_notificationtimestamp already set on watchlist table.
...have page_lang field in page table.
...have pl_from_namespace field in pagelinks table.
...have tl_from_namespace field in templatelinks table.
...have il_from_namespace field in imagelinks table.
...img_major_mime in table image already modified by patch patch-img_major_mime-chemical.sql.
...oi_major_mime in table oldimage already modified by patch patch-oi_major_mime-chemical.sql.
...fa_major_mime in table filearchive already modified by patch patch-fa_major_mime-chemical.sql.
...comment fields are up to date.
...hitcounter doesn't exist.
...site_stats table does not contain ss_total_views field.
...page table does not contain page_counter field.
...msg_resource_links doesn't exist.
...msg_resource doesn't exist.
...bot_passwords table already exists.
...have wl_id field in watchlist table.
...cl_collation key doesn't exist.
...index cl_collation_ext already set on categorylinks table.
...collations up-to-date.
...index rc_name_type_patrolled_timestamp already set on recentchanges table.
...rev_page_id index already non-unique.
...pl_namespace, tl_namespace, il_to indices are already non-UNIQUE.
...have ct_id field in change_tag table.
...rc_ip in table recentchanges already modified by patch patch-rc_ip_modify.sql.
...have el_index_60 field in externallinks table.
...ug_user_group key doesn't exist.
...have ug_expiry field in user_groups table.
...img_media_type in table image already modified by patch patch-add-3d.sql.
...ip_changes table already exists.
...index PRIMARY already set on categorylinks table.
...index PRIMARY already set on templatelinks table.
...index PRIMARY already set on pagelinks table.
...index PRIMARY already set on text table.
...index PRIMARY already set on imagelinks table.
...index PRIMARY already set on iwlinks table.
...index PRIMARY already set on langlinks table.
...index PRIMARY already set on log_search table.
...index PRIMARY already set on module_deps table.
...index PRIMARY already set on objectcache table.
...index PRIMARY already set on querycache_info table.
...index PRIMARY already set on site_stats table.
...index PRIMARY already set on user_former_groups table.
...index PRIMARY already set on user_properties table.
...comment table already exists.
...revision_comment_temp table already exists.
...have ar_comment_id field in archive table.
...have fa_description_id field in filearchive table.
...img_description field does not exist in image table, skipping modify field patch.
...have ipb_reason_id field in ipblocks table.
...have log_comment_id field in logging table.
...have oi_description_id field in oldimage table.
...have pt_reason_id field in protected_titles table.
...have rc_comment_id field in recentchanges table.
Modifying rev_comment field of table revision ...done.
...have img_description_id field in image table.
...index PRIMARY already set on l10n_cache table.
...bot_passwords.bp_user is already unsigned int.
...change_tag.ct_log_id is already unsigned int.
...change_tag.ct_rev_id is already unsigned int.
...page_restrictions.pr_user is already unsigned int.
...user_newtalk.user_id is already unsigned int.
...user_properties.up_user is already unsigned int.
...slots table already exists.
...have slot_origin field in slots table.
...content table already exists.
...slot_roles table already exists.
...content_models table already exists.
...actor table already exists.
...revision_actor_temp table already exists.
...have ar_actor field in archive table.
...have ipb_by_actor field in ipblocks table.
...have img_actor field in image table.
...have oi_actor field in oldimage table.
...have fa_actor field in filearchive table.
...have rc_actor field in recentchanges table.
...have log_actor field in logging table.
...rev_text_id in table revision already modified by patch patch-rev_text_id-default.sql.
...table site_stats already modified by patch patch-site_stats-modify.sql.
...index rc_namespace_title_timestamp already set on recentchanges table.
...change_tag_def table already exists.
...el_index_60 in table externallinks already modified by patch patch-externallinks-el_index_60-drop-default.sql.
Running maintenance/deduplicateArchiveRevId.php...
...Update 'DeduplicateArchiveRevId' already logged as completed. Use --force to run it again.
done.
...have ct_tag_id field in change_tag table.
...index ar_revid_uniq already set on archive table.
...index log_type_action already set on logging table.
...type_action key doesn't exist.
...index PRIMARY already set on interwiki table.
...index PRIMARY already set on page_props table.
...index PRIMARY already set on protected_titles table.
...index PRIMARY already set on site_identifiers table.
...index rc_this_oldid already set on recentchanges table.
...transcache doesn't exist.
Running maintenance/populateChangeTagDef.php...
...Update 'PopulateChangeTagDef' already logged as completed. Use --force to run it again.
done.
...index change_tag_rc_tag_id already set on change_tag table.
...have ipb_sitewide field in ipblocks table.
...ipblocks_restrictions table already exists.
...change_tag table does not contain ct_tag field.
...valid_tag doesn't exist.
...tag_summary doesn't exist.
...protected_titles table does not contain pt_reason field.
...table job already modified by patch patch-job-params-mediumblob.sql.
...ar_usertext_timestamp key doesn't exist.
Dropping usertext_timestamp index from table archive ...done.
Table logging contains log_user field. Dropping ...done.
Adding index un_user_ip to table user_newtalk ...done.
...echo_event table already exists.
...echo_email_batch table already exists.
...echo_target_page table already exists.
...event_agent field does not exist in echo_event table, skipping modify field patch.
...event_variant in table echo_event already modified by patch /srv/mediawiki/extensions/Echo/db_patches/patch-event_variant_nullability.sql.
...event_extra in table echo_event already modified by patch /srv/mediawiki/extensions/Echo/db_patches/patch-event_extra-size.sql.
...event_agent_ip in table echo_event already modified by patch /srv/mediawiki/extensions/Echo/db_patches/patch-event_agent_ip-size.sql.
...have etp_id field in echo_target_page table.
...echo_target_page table does not contain etp_user field.
...have notification_bundle_hash field in echo_notification table.
...echo_subscription doesn't exist.
...echo_event table does not contain event_timestamp field.
...have eeb_event_hash field in echo_email_batch table.
...have event_page_id field in echo_event table.
...index echo_event_type already set on echo_event table.
...index echo_user_timestamp already set on echo_notification table.
...index echo_notification_event already set on echo_notification table.
...have event_deleted field in echo_event table.
...index echo_notification_user_read_timestamp already set on echo_notification table.
...index echo_target_page_page_event already set on echo_target_page table.
...index echo_event_page_id already set on echo_event table.
...user_event key doesn't exist.
Running extensions/Echo/maintenance/updateEchoSchemaForSuppression.php...
...Update 'UpdateEchoSchemaForSuppression' already logged as completed. Use --force to run it again.
done.
...echo_event table does not contain event_page_namespace field.
...echo_event table does not contain event_page_title field.
...echo_notification table does not contain notification_bundle_base field.
...echo_notification table does not contain notification_bundle_display_hash field.
...echo_notification_user_hash_timestamp key doesn't exist.
...cu_changes table already exists.
...cu_log table already exists.
...index cuc_ip_hex_time already set on cu_changes table.
...index cuc_user_ip_time already set on cu_changes table.
...have cuc_private field in cu_changes table.
...abuse_filter table already exists.
...abuse_filter_history table already exists.
...have afh_changed_fields field in abuse_filter_history table.
...have af_deleted field in abuse_filter table.
...have af_actions field in abuse_filter table.
...have af_global field in abuse_filter table.
...have afl_rev_id field in abuse_filter_log table.
...index filter_timestamp already set on abuse_filter_log table.
...have af_group field in abuse_filter table.
...index wiki_timestamp already set on abuse_filter_log table.
...afl_namespace in table abuse_filter_log already modified by patch /srv/mediawiki/extensions/AbuseFilter/db_patches/patch-afl-namespace_int.sql.
Table abuse_filter_log contains afl_log_id field. Dropping ...done.
Adding index filter_timestamp_full to table abuse_filter_log ...done.
...aft_feedback table already exists.
...have aft_noaction field in aft_feedback table.
...have aft_archive field in aft_feedback table.
...have aft_inappropriate field in aft_feedback table.
...index contribs already set on aft_feedback table.
...index relevance_page already set on aft_feedback table.
...have aft_discuss field in aft_feedback table.
...have aft_claimed_user field in aft_feedback table.
...site_stats is populated...done.
...Update 'populate rev_len and ar_len' already logged as completed. Use --force to run it again.
...Update 'populate rev_sha1' already logged as completed. Use --force to run it again.
...img_sha1 column of image table already populated.
...protocol-relative URLs in externallinks table already fixed.
...fa_sha1 column of filearchive table already populated.
...*_from_namespace column of backlink tables already populated.
...Update 'FixDefaultJsonContentPages' already logged as completed. Use --force to run it again.
...Update 'cleanup empty categories' already logged as completed. Use --force to run it again.
...RFC and PMID already added to interwiki database table.
...Update 'populate pp_sortkey' already logged as completed. Use --force to run it again.
...Update 'populate ip_changes' already logged as completed. Use --force to run it again.
...externallinks table indexes up to date
...Update 'RemoveOrphanedEvents' already logged as completed. Use --force to run it again.
No throttle parameters to normalize.
Throttle parameters successfully normalized. Changed 0 rows.
...Update 'ArticleFeedbackv5_SetArchiveDate' already logged as completed. Use --force to run it again.
Set the local repo temp zone container to be private.
Purging caches...done.

Done in 8.3 s.

Restarting server (Trying to fix login problems faced by Kaustubh, Ayush and me)

$ ssh metakgp
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-130-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

121 packages can be updated.
1 update is a security update.

New release '18.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


*** System restart required ***
Last login: Sat Nov  2 03:56:57 2019 from 124.37.223.191
icyflame@metakgp-blr:~$ ls
backups
icyflame@metakgp-blr:~$ docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                NAMES
b4b6935034f4        metakgp-wiki_jobs      "supercronic /root/c…"   2 months ago        Up 2 months                              metakgp-wiki_jobs_1
9e3f2f149296        metakgp-wiki_backup    "./run_cron.sh"          2 months ago        Up 2 months                              metakgp-wiki_backup_1
7c9047dadc13        metakgp-wiki_parsoid   "docker-entrypoint.s…"   2 months ago        Up 2 months                              metakgp-wiki_parsoid_1
fae6a4685618        metakgp-wiki_nginx     "nginx -g 'daemon of…"   2 months ago        Up 2 months         0.0.0.0:80->80/tcp   metakgp-wiki_nginx_1
36a9ce05ae53        metakgp-wiki_php       "docker-php-entrypoi…"   2 months ago        Up 2 months         9000/tcp             metakgp-wiki_php_1
1295d668eb43        mysql:5.7              "docker-entrypoint.s…"   2 months ago        Up 2 months         3306/tcp             metakgp-wiki_mysql_1
icyflame@metakgp-blr:~$ ls
backups
icyflame@metakgp-blr:~$ ls
backups
icyflame@metakgp-blr:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           2.0G        702M        100M        125M        1.2G        949M
Swap:            0B          0B          0B
icyflame@metakgp-blr:~$ docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                NAMES
b4b6935034f4        metakgp-wiki_jobs      "supercronic /root/c…"   2 months ago        Up 2 months                              metakgp-wiki_jobs_1
9e3f2f149296        metakgp-wiki_backup    "./run_cron.sh"          2 months ago        Up 2 months                              metakgp-wiki_backup_1
7c9047dadc13        metakgp-wiki_parsoid   "docker-entrypoint.s…"   2 months ago        Up 2 months                              metakgp-wiki_parsoid_1
fae6a4685618        metakgp-wiki_nginx     "nginx -g 'daemon of…"   2 months ago        Up 2 months         0.0.0.0:80->80/tcp   metakgp-wiki_nginx_1
36a9ce05ae53        metakgp-wiki_php       "docker-php-entrypoi…"   2 months ago        Up 2 months         9000/tcp             metakgp-wiki_php_1
1295d668eb43        mysql:5.7              "docker-entrypoint.s…"   2 months ago        Up 2 months         3306/tcp             metakgp-wiki_mysql_1
icyflame@metakgp-blr:~$ ls
backups
icyflame@metakgp-blr:~$ sudo su
[sudo] password for icyflame:
root@metakgp-blr:/home/icyflame# cd
root@metakgp-blr:~# ls
metakgp-wiki  missing_images  remote
root@metakgp-blr:~# cd metakgp-wiki/
root@metakgp-blr:~/metakgp-wiki# git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        current
        peqp.zip
        peqp/

nothing added to commit but untracked files present (use "git add" to track)
root@metakgp-blr:~/metakgp-wiki# git logs --oneline | head -n1
git: 'logs' is not a git command. See 'git --help'.

Did you mean this?
        log
root@metakgp-blr:~/metakgp-wiki# git log --oneline | head -n1
b6ec265 Switch to QuestyCaptcha (#71)
root@metakgp-blr:~/metakgp-wiki# docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.prod.yml down
Stopping metakgp-wiki_jobs_1    ... done
Stopping metakgp-wiki_backup_1  ... done
Stopping metakgp-wiki_parsoid_1 ... done
Stopping metakgp-wiki_nginx_1   ... done
Stopping metakgp-wiki_php_1     ... done
Stopping metakgp-wiki_mysql_1   ... done
Removing metakgp-wiki_jobs_1      ... done
Removing metakgp-wiki_mediawiki_1 ... done
Removing metakgp-wiki_backup_1    ... done
Removing metakgp-wiki_parsoid_1   ... done
Removing metakgp-wiki_nginx_1     ... done
Removing metakgp-wiki_php_1       ... done
Removing metakgp-wiki_mysql_1     ... done
Removing network metakgp-wiki_main_network
Removing network metakgp-wiki_data_network
Removing network metakgp-wiki_default
Removing network metakgp-wiki_mysql_network
(reverse-i-search)`docker volume rm metakgp': docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.prod.yml exec backup ./run_backup.sh && git pull && docker-compose build && docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.prod.yml down && ^Ccker volume rm metakgp-wiki_mediawiki-volume && docker-compose up --build -d && docker-compose -f
 docker-compose.yml -f docker-compose.override.yml -f docker-compose.prod.yml exec php /srv/mediawiki/maintenance/update.php
root@metakgp-blr:~/metakgp-wiki# docker volume ls | grep -i mediawiki
local               metakgp-wiki_mediawiki-volume
root@metakgp-blr:~/metakgp-wiki# docker volume rm metakgp-wiki_mediawiki-volume
metakgp-wiki_mediawiki-volume
root@metakgp-blr:~/metakgp-wiki# docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.prod.yml up --build -d
Creating network "metakgp-wiki_data_network" with the default driver
Creating network "metakgp-wiki_main_network" with the default driver
Creating network "metakgp-wiki_mysql_network" with the default driver
Creating network "metakgp-wiki_default" with the default driver
Creating volume "metakgp-wiki_mediawiki-volume" with default driver
Building php
Step 1/8 : FROM php:7-fpm-jessie
 ---> c0fde7edec0c
Step 2/8 : RUN apt-get -qq update && apt-get -qq install -y             build-essential             git-core             gnupg2             graphicsmagick             libfreetype6-dev             libicu-dev             libjpeg62-turbo-dev             libpng-dev             wget       && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/       && docker-php-ext-install -j$(nproc) gd intl mysqli opcache       && pecl install apcu       && docker-php-ext-enable apcu       && pear install Numbers_Words-beta       && apt-get purge
 ---> Using cache
 ---> 8c97dd13ce42
Step 3/8 : ENV TZ=Asia/Kolkata
 ---> Using cache
 ---> 0ce440b617ce
Step 4/8 : RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 ---> Using cache
 ---> d3a5f67b38b8
Step 5/8 : COPY php.ini /usr/local/etc/php/
 ---> Using cache
 ---> 7f9dd130dfc1
Step 6/8 : RUN echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list       && wget -q -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -       && apt-get update       && apt-get -qq install -y newrelic-php5       && NR_INSTALL_SILENT=1 newrelic-install install       && sed -i           -e "s/newrelic.appname =.*/newrelic.appname = \"Metakgp Wiki\"/"           -e "s/newrelic.license =.*/newrelic.license = \${NEWRELIC_LICENSE}/"           -e "s/;newrelic.framework =.*/newrelic.framework = \"mediawiki\"/"           /usr/local/etc/php/conf.d/newrelic.ini
 ---> Using cache
 ---> a3640008d113
Step 7/8 : RUN mkdir -p /var/log/mediawiki       && touch /var/log/mediawiki/debug.log       && chown -R www-data:www-data /var/log/mediawiki
 ---> Using cache
 ---> 2a45f870aa35
Step 8/8 : VOLUME /var/log
 ---> Using cache
 ---> 70d64ec713b9
Successfully built 70d64ec713b9
Successfully tagged metakgp-wiki_php:latest
Building nginx
Step 1/5 : FROM nginx:mainline
 ---> e548f1a579cf
Step 2/5 : COPY wiki.metakgp.org /etc/nginx/sites-enabled/
 ---> Using cache
 ---> b567a772f5bc
Step 3/5 : COPY static.metakgp.org /etc/nginx/sites-enabled/
 ---> Using cache
 ---> ac1fea8fd720
Step 4/5 : COPY nginx.conf /etc/nginx/
 ---> Using cache
 ---> 74f299329780
Step 5/5 : RUN rm /etc/nginx/conf.d/default.conf
 ---> Using cache
 ---> 417f3054f465
Successfully built 417f3054f465
Successfully tagged metakgp-wiki_nginx:latest
Building backup
Step 1/11 : FROM python:2-jessie
 ---> 96f10bf3d8fa
Step 2/11 : RUN apt-get -qq update && apt-get -qq install -y       cron       mysql-client       rsync
 ---> Using cache
 ---> c970a0bbb59b
Step 3/11 : ENV TZ=Asia/Kolkata
 ---> Using cache
 ---> e620dfe47c24
Step 4/11 : RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 ---> Using cache
 ---> e93224ab8d57
Step 5/11 : COPY backup-cron /etc/cron.d/
 ---> Using cache
 ---> 472dea88d02f
Step 6/11 : RUN chmod 0644 /etc/cron.d/backup-cron
 ---> Using cache
 ---> 80381a13b098
Step 7/11 : COPY run_cron.sh run_backup.sh backup_to_dropbox.py requirements.txt /root/
 ---> Using cache
 ---> a3085120cf86
Step 8/11 : WORKDIR /root
 ---> Using cache
 ---> c3fc3e75133c
Step 9/11 : RUN pip install -r requirements.txt
 ---> Using cache
 ---> d5e53c111730
Step 10/11 : VOLUME /var/log
 ---> Using cache
 ---> 939194c2d1a5
Step 11/11 : CMD ["./run_cron.sh"]
 ---> Using cache
 ---> a1ba4c5b9c5b
Successfully built a1ba4c5b9c5b
Successfully tagged metakgp-wiki_backup:latest
Building mediawiki
Step 1/15 : FROM php:7-fpm-jessie
 ---> c0fde7edec0c
Step 2/15 : RUN apt-get -qq update && apt-get -qq install -y       git wget unzip
 ---> Using cache
 ---> 2a21076484d9
Step 3/15 : WORKDIR /tmp
 ---> Using cache
 ---> 33d960288973
Step 4/15 : RUN wget -q https://releases.wikimedia.org/mediawiki/1.33/mediawiki-1.33.0.tar.gz       && tar -xzf mediawiki-1.33.0.tar.gz       && mkdir -p /srv       && mv /tmp/mediawiki-1.33.0 /srv/mediawiki
 ---> Using cache
 ---> 9b73ba5f5af4
Step 5/15 : COPY install_extensions.sh post_install.sh /tmp/
 ---> Using cache
 ---> c081e7da7e49
Step 6/15 : RUN /tmp/install_extensions.sh
 ---> Using cache
 ---> 3af159060f57
Step 7/15 : COPY LocalSettings.php robots.txt install_composer.sh composer.local.json /srv/mediawiki/
 ---> 76ceb85f8c23
Step 8/15 : WORKDIR /srv/mediawiki
 ---> Running in eae666a1fadb
Removing intermediate container eae666a1fadb
 ---> def6fa1f7a84
Step 9/15 : COPY extensions/ extensions/
 ---> df98f749163f
Step 10/15 : RUN ./install_composer.sh       && php composer.phar update --no-dev --optimize-autoloader --no-suggest --no-progress
 ---> Running in aa68933a3186
> ComposerHookHandler::onPreUpdate
Loading composer repositories with package information
Updating dependencies
Package operations: 24 installs, 3 updates, 1 removal
  - Removing wikimedia/avro (v1.8.0)
  - Installing composer/installers (v1.7.0): Downloading (100%)
  - Updating pear/pear-core-minimal (v1.10.7 => v1.10.9): Downloading (100%)
  - Updating ralouphie/getallheaders (2.0.5 => 3.0.3): Downloading (100%)
  - Updating guzzlehttp/psr7 (1.5.0 => 1.6.1): Downloading (100%)
  - Installing firebase/php-jwt (v3.0.0): Downloading (100%)
  - Installing james-heinrich/getid3 (v1.9.18): Downloading (100%)
  - Installing willdurand/geocoder (4.2.1): Downloading (100%)
  - Installing jeroen/file-fetcher (6.0.0): Downloading (100%)
  - Installing psr/simple-cache (1.0.1): Downloading (100%)
  - Installing jeroen/simple-cache (2.0.0): Downloading (100%)
  - Installing data-values/interfaces (0.2.5): Downloading (100%)
  - Installing data-values/data-values (2.3.0): Downloading (100%)
  - Installing data-values/geo (4.2.0): Downloading (100%)
  - Installing data-values/common (0.4.3): Downloading (100%)
  - Installing jeroen/simple-geocoder (1.3.0): Downloading (100%)
  - Installing jeroen/file-fetcher-cache (1.0.0): Downloading (100%)
  - Installing data-values/validators (0.1.3): Downloading (100%)
  - Installing param-processor/param-processor (1.10.0): Downloading (100%)
  - Installing mediawiki/parser-hooks (1.5.0): Downloading (100%)
  - Installing mediawiki/validator (2.2.1): Downloading (100%)
  - Installing mediawiki/maps (7.10.0): Downloading (100%)
  - Installing pear/mail_mime-decode (1.5.5.2): Downloading (100%)
  - Installing pimple/pimple (v2.1.1): Downloading (100%)
  - Installing ruflin/elastica (3.2.4): Downloading (100%)
  - Installing symfony/process (v3.4.33): Downloading (100%)
  - Installing wikimedia/textcat (1.3.0): Downloading (100%)
  - Installing mediawiki/simple-batch-upload (1.4.0): Downloading (100%)
Writing lock file
Generating optimized autoload files
> ComposerVendorHtaccessCreator::onEvent
Removing intermediate container aa68933a3186
 ---> ca02e09ca826
Step 11/15 : COPY assets/ resources/assets/
 ---> 87aacf1a6688
Step 12/15 : COPY gmconvert.sh /opt/
 ---> 092fcc5d870b
Step 13/15 : RUN mkdir -p /srv/static/images && rm -rf images && ln -s /srv/static/images images
 ---> Running in 5dccfea7c804
Removing intermediate container 5dccfea7c804
 ---> 16ea8cf6a4ba
Step 14/15 : RUN mkdir -p images/temp
 ---> Running in ec0872e9820d
Removing intermediate container ec0872e9820d
 ---> 5b9429c83615
Step 15/15 : ENTRYPOINT /tmp/post_install.sh
 ---> Running in d11951092561
Removing intermediate container d11951092561
 ---> 62c1845bb576
Successfully built 62c1845bb576
Successfully tagged metakgp-wiki_mediawiki:latest
Building parsoid
Step 1/9 : FROM node:10-jessie
 ---> 5c9623bde525
Step 2/9 : RUN apt-get -qq update && apt-get -qq install -y             git-core
 ---> Using cache
 ---> bc40d509b573
Step 3/9 : RUN useradd --create-home --shell /bin/bash parsoid
 ---> Using cache
 ---> 38b385f9caaf
Step 4/9 : USER parsoid
 ---> Using cache
 ---> 437f5274f45b
Step 5/9 : WORKDIR /home/parsoid
 ---> Using cache
 ---> d795997a7199
Step 6/9 : RUN git clone https://gerrit.wikimedia.org/r/mediawiki/services/parsoid &&     cd parsoid &&     git checkout v0.10.0 &&     npm install
 ---> Using cache
 ---> 9a6b7ff382ed
Step 7/9 : WORKDIR /home/parsoid/parsoid
 ---> Using cache
 ---> 19882683294b
Step 8/9 : COPY config.yaml ./
 ---> Using cache
 ---> 8f4e092250d6
Step 9/9 : CMD ["npm", "start"]
 ---> Using cache
 ---> 98f6df8aa8ed
Successfully built 98f6df8aa8ed
Successfully tagged metakgp-wiki_parsoid:latest
Building jobs
Step 1/15 : FROM python:2
 ---> d8690ef56706
Step 2/15 : RUN apt-get -qq update && apt-get install -qq -y       wget
 ---> Using cache
 ---> 67c4e1b52a93
Step 3/15 : ENV TZ=Asia/Kolkata
 ---> Using cache
 ---> e24714b2c67b
Step 4/15 : RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 ---> Using cache
 ---> 0bc59e63c66e
Step 5/15 : ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-amd64     SUPERCRONIC=supercronic-linux-amd64     SUPERCRONIC_SHA1SUM=96960ba3207756bb01e6892c978264e5362e117e
 ---> Using cache
 ---> 7fed4a997b9a
Step 6/15 : RUN curl -fsSLO "$SUPERCRONIC_URL"  && echo "${SUPERCRONIC_SHA1SUM}  ${SUPERCRONIC}" | sha1sum -c -  && chmod +x "$SUPERCRONIC"  && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}"  && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
 ---> Using cache
 ---> 91dd24ed5d2a
Step 7/15 : WORKDIR /root
 ---> Using cache
 ---> 521af6c7d4da
Step 8/15 : RUN wget -qO- http://tools.wmflabs.org/pywikibot/core.tar.gz | tar xz       && mv core pywikibot
 ---> Using cache
 ---> bf5e84c0a5fe
Step 9/15 : COPY requirements.txt ./
 ---> Using cache
 ---> d6c6f3e18b66
Step 10/15 : RUN pip install -qr requirements.txt
 ---> Using cache
 ---> b794ca8decf9
Step 11/15 : COPY pywikibot/user-config.py pywikibot/user-password.py pywikibot/
 ---> Using cache
 ---> 07e02eadccca
Step 12/15 : COPY pywikibot/metakgp_family.py pywikibot/pywikibot/families/
 ---> Using cache
 ---> feb3838f6a16
Step 13/15 : COPY pywikibot/scripts/ pywikibot/scripts/
 ---> Using cache
 ---> ea3026e03306
Step 14/15 : COPY crontab update_top_trending.sh MetaMaint.sh update_spam_blacklist.sh ./
 ---> Using cache
 ---> 3479aa8f049f
Step 15/15 : CMD ["supercronic", "/root/crontab"]
 ---> Using cache
 ---> 2e57fba8dfad
Successfully built 2e57fba8dfad
Successfully tagged metakgp-wiki_jobs:latest
Creating metakgp-wiki_mediawiki_1 ... done
Creating metakgp-wiki_nginx_1     ... done
Creating metakgp-wiki_jobs_1      ... done
Creating metakgp-wiki_backup_1    ... done
Creating metakgp-wiki_php_1       ... done
Creating metakgp-wiki_mysql_1     ... done
Creating metakgp-wiki_parsoid_1   ... done
root@metakgp-blr:~/metakgp-wiki# docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                NAMES
eda8498d708d        metakgp-wiki_parsoid   "docker-entrypoint.s…"   32 seconds ago      Up 28 seconds                            metakgp-wiki_parsoid_1
bda6fa2ddf8a        metakgp-wiki_php       "docker-php-entrypoi…"   32 seconds ago      Up 25 seconds       9000/tcp             metakgp-wiki_php_1
4efb1f830bf6        mysql:5.7              "docker-entrypoint.s…"   32 seconds ago      Up 25 seconds       3306/tcp             metakgp-wiki_mysql_1
ffb03a4a822c        metakgp-wiki_backup    "./run_cron.sh"          32 seconds ago      Up 26 seconds                            metakgp-wiki_backup_1
5c00e128ae76        metakgp-wiki_jobs      "supercronic /root/c…"   32 seconds ago      Up 29 seconds                            metakgp-wiki_jobs_1
fed0c4ceea99        metakgp-wiki_nginx     "nginx -g 'daemon of…"   32 seconds ago      Up 28 seconds       0.0.0.0:80->80/tcp   metakgp-wiki_nginx_1
icyflame@metakgp-blr:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           2.0G        509M        110M         92M        1.3G        1.1G
Swap:            0B          0B          0B

Adding a user for @amrav

Last login: Sun Aug  4 02:47:13 2019 from 124.37.223.191
icyflame@metakgp-blr:~$ sudo adduser amrav
[sudo] password for icyflame:
Adding user `amrav' ...
Adding new group `amrav' (1002) ...
Adding new user `amrav' (1002) with group `amrav' ...
Creating home directory `/home/amrav' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for amrav
Enter the new value, or press ENTER for the default
        Full Name []: Vikrant Varma
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n]
icyflame@metakgp-blr:~$ sudo -i -u amrav
amrav@metakgp-blr:~$ mkdir ~/.ssh
amrav@metakgp-blr:~$ curl https://github.com/amrav.keys >> ~/.ssh/authorized_keys
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   381    0   381    0     0    811      0 --:--:-- --:--:-- --:--:--   812
amrav@metakgp-blr:~$ chmod 700 ~/.ssh
amrav@metakgp-blr:~$ chmod 600 ~/.ssh/authorized_keys
amrav@metakgp-blr:~$ exit;
logout
icyflame@metakgp-blr:~$ usermod -a -G admin amrav
usermod: Permission denied.
usermod: cannot lock /etc/passwd; try again later.
icyflame@metakgp-blr:~$ sudo usermod -a -G admin amrav
icyflame@metakgp-blr:~$ sudo chage -d 0 amrav
icyflame@metakgp-blr:~$ exit;
logout
Connection to ssh.metakgp.org closed.

- Icyflame (talk) 08:28, 4 August 2019 (IST)