Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
opennic:infra:wiki [2017-07-19T23:01:34Z]
fusl
opennic:infra:wiki [2017-10-18T15:11:18Z]
fusl
Line 1: Line 1:
 ====== wiki.opennic.org infrastructure ====== ====== wiki.opennic.org infrastructure ======
 +==== Maintainers ====
 +  - [[/user/fusl]]
 +
 +===== The Infrastructure =====
 The wiki.opennic.org website runs on [[https://aws.amazon.com/|Amazon Web Services (AWS)]] infrastructure and uses various services offered by AWS: The wiki.opennic.org website runs on [[https://aws.amazon.com/|Amazon Web Services (AWS)]] infrastructure and uses various services offered by AWS:
  
-===== Elastic File System =====+==== Elastic File System ====
 The [[https://aws.amazon.com/efs/|EFS service]] is used to store all wiki pages, configurations, attachments, etc. on a scalable, shared filesystem using NFS as protocol.  The [[https://aws.amazon.com/efs/|EFS service]] is used to store all wiki pages, configurations, attachments, etc. on a scalable, shared filesystem using NFS as protocol. 
  
   * Endpoint: ''fs-ee48faa7.efs.us-east-1.amazonaws.com''   * Endpoint: ''fs-ee48faa7.efs.us-east-1.amazonaws.com''
  
-===== ElastiCache =====+==== ElastiCache ====
 [[https://aws.amazon.com/elasticache/|ElastiCache]] stores all PHP sessions in a single Memcached instance to ensure session and login-state persistency and reliability across all floating wiki.opennic.org webserver instances. [[https://aws.amazon.com/elasticache/|ElastiCache]] stores all PHP sessions in a single Memcached instance to ensure session and login-state persistency and reliability across all floating wiki.opennic.org webserver instances.
  
   * Endpoint: ''prod-wiki-sess.xqtznt.cfg.use1.cache.amazonaws.com:11211''   * Endpoint: ''prod-wiki-sess.xqtznt.cfg.use1.cache.amazonaws.com:11211''
  
-===== Auto Scaling =====+==== Auto Scaling ====
 To automatically scale the wiki instances to the desired performance and to ensure reliability even on instance failures, we use an [[https://aws.amazon.com/autoscaling/|Auto Scaling]] group which handles automatic scaling at your desire. To automatically scale the wiki instances to the desired performance and to ensure reliability even on instance failures, we use an [[https://aws.amazon.com/autoscaling/|Auto Scaling]] group which handles automatic scaling at your desire.
  
-==== Details ====+=== Details ===
   * Auto Scaling Group: ''prod-wiki''   * Auto Scaling Group: ''prod-wiki''
-  * Launch Configuration: ''prod-wiki-20170506-4''+  * Launch Configuration: ''prod-wiki-20170909''
   * Load Balancers: -   * Load Balancers: -
   * Target Groups: ''prod-wiki''   * Target Groups: ''prod-wiki''
Line 35: Line 39:
   * Instance Protection: -   * Instance Protection: -
  
-==== Scaling Policies ==== +=== Scaling Policies === 
-=== prod-wiki-high ===+== prod-wiki-high ==
   * Policy type: ''Simple scaling''   * Policy type: ''Simple scaling''
-  * Execute policy when: ''prod-wiki-high'' (breaches the alarm threshold: ''TargetResponseTime >= 1'' for *300seconds for the metric dimensions ''LoadBalancer = app/prod-wiki/0ec4b8b4601b350c'')+  * Execute policy when: ''prod-wiki-high'' (breaches the alarm threshold: ''TargetResponseTime >= 1'' for ''300'' seconds for the metric dimensions ''LoadBalancer = app/prod-wiki/0ec4b8b4601b350c'')
   * Take the action: ''Add 2 instances''   * Take the action: ''Add 2 instances''
   * And then wait: ''180 seconds before allowing another scaling activity''   * And then wait: ''180 seconds before allowing another scaling activity''
  
-=== prod-wiki-low ===+== prod-wiki-low ==
   * Policy type: ''Simple scaling''   * Policy type: ''Simple scaling''
-  * Execute policy when: ''prod-wiki-low'' (breaches the alarm threshold: ''TargetResponseTime <= 0.5'' for *300seconds for the metric dimensions ''LoadBalancer = app/prod-wiki/0ec4b8b4601b350c'')+  * Execute policy when: ''prod-wiki-low'' (breaches the alarm threshold: ''TargetResponseTime <= 0.5'' for ''300'' seconds for the metric dimensions ''LoadBalancer = app/prod-wiki/0ec4b8b4601b350c'')
   * Take the action: ''Remove 1 instances''   * Take the action: ''Remove 1 instances''
   * And then wait: ''180 seconds before allowing another scaling activity''   * And then wait: ''180 seconds before allowing another scaling activity''
  
-==== Tags ====+=== Tags ===
 ^ Key ^ Value ^ Tag New Instances ^ ^ Key ^ Value ^ Tag New Instances ^
 | Name | prod-wiki | Yes | | Name | prod-wiki | Yes |
  
-==== Launch Configuration ==== +=== Launch Configuration === 
-  * AMI: ''ami-80861296''+  * AMI: //AMI created by [[https://github.com/opennic/packers/tree/master/opennic-wiki|opennic-wiki packer]]//
   * Instance type: ''t2.nano'' (t2.nano (Variable ECUs, 1 vCPUs, 2.4 GHz, Intel Xeon Family, 0.5 GiB memory, EBS only))   * Instance type: ''t2.nano'' (t2.nano (Variable ECUs, 1 vCPUs, 2.4 GHz, Intel Xeon Family, 0.5 GiB memory, EBS only))
   * Name: ''prod-wiki-20170506-4''   * Name: ''prod-wiki-20170506-4''
Line 61: Line 65:
   * Kernel ID: ''Use default''   * Kernel ID: ''Use default''
   * RAM Disk ID: ''Use default''   * RAM Disk ID: ''Use default''
-  * User data (As text): {{:opennic:infra:prod-wiki-asg-user-data.txt|}}+  * User data (As text): -
   * IP Address Type: ''Assign a public IP address to every instance.''   * IP Address Type: ''Assign a public IP address to every instance.''
   * Storage   * Storage
Line 75: Line 79:
   * Security group: ''sg-3eccfc41''   * Security group: ''sg-3eccfc41''
  
-===== Elastic Load Balancer =====+==== Elastic Load Balancer ====
 An [[https://aws.amazon.com/elasticloadbalancing/|Elastic Load Balancer]] distributes HTTP queries to wiki.opennic.org across all instances in the auto scaling group. An [[https://aws.amazon.com/elasticloadbalancing/|Elastic Load Balancer]] distributes HTTP queries to wiki.opennic.org across all instances in the auto scaling group.
  
Line 122: Line 126:
       * Is: ''<='' ''500''       * Is: ''<='' ''500''
       * For at least: ''1'' consecutive period(s) of ''5 Minutes''       * For at least: ''1'' consecutive period(s) of ''5 Minutes''
-===== git sync ===== +==== git sync ==== 
-The entire web root directory is synced to [[https://github.com/opennic/wikipages|GitHub]] approximately every 30 minutes using [[https://github.com/opennic/wikipages/blob/master/sync.sh|this]] simple bash script. Some files are [[https://github.com/opennic/wikipages/blob/master/.gitignore|not synced]] to the repository, for example the ''conf/users.auth.php'' file containing all users with their email addresses and passwords until LDAP authentication is up and running.+The entire web root directory is synced to [[https://github.com/opennic/wikipages|GitHub]] approximately every 60 minutes using [[https://github.com/opennic/packers/blob/master/opennic-wiki/files-pre/etc/cron.hourly/gitsync|crontab script]] deployed when building the AWS AMI using our [[https://github.com/opennic/packers/tree/master/opennic-wiki|Packer deployment definitions]]. Some files are [[https://github.com/opennic/wikipages/blob/master/.gitignore|not synced]] to the repository.
  • /wiki/data/pages/opennic/infra/wiki.txt
  • Last modified: 20 months ago
  • by fusl