You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+99-30Lines changed: 99 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,45 +7,108 @@ The EB CLI integrates with Git and simplifies the process of creating environmen
7
7
8
8
If you have pip, use it to install the EB CLI.
9
9
10
-
```
10
+
```Shell
11
11
$ pip install --user --upgrade awsebcli
12
+
```
13
+
14
+
Add the local install location to your OS's path variable.
15
+
16
+
###### Linux
17
+
```Shell
12
18
$ export PATH=~/.local/bin:$PATH
13
19
```
20
+
###### OS-X
21
+
```Shell
22
+
$ export PATH=~/Library/Python/3.4/bin:$PATH
23
+
```
24
+
###### Windows
25
+
Add `%USERPROFILE%\AppData\Roaming\Python\Scripts` to your PATH variable. Search for **Edit environment variables for your account** in the Start menu.
14
26
15
27
If you don't have pip, follow the instructions [here](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html).
16
28
17
-
## Download and extract Drupal and the configuration files
3. Extract Drupal and change the name of the folder
41
+
42
+
~$ tar -xvf drupal.tar.gz
43
+
~$ mv drupal-8.2.2 drupal-beanstalk
44
+
~$ cd drupal-beanstalk
45
+
46
+
4. Extract the configuration files over the Drupal installation
47
+
48
+
~/drupal-beanstalk$ unzip ~/eb-php-drupal.zip
49
+
creating: .ebextensions/
50
+
inflating: .ebextensions/dev.config
51
+
inflating: .ebextensions/drupal.config
52
+
inflating: .ebextensions/efs-create.config
53
+
inflating: .ebextensions/efs-mount.config
54
+
inflating: .ebextensions/loadbalancer-sg.config
55
+
inflating: LICENSE
56
+
inflating: README.md
57
+
inflating: beanstalk-settings.php
58
+
59
+
60
+
## Create an Elastic Beanstalk environment
61
+
62
+
1. Configure a local EB CLI repository with the PHP platform. Choose a [supported region](http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) that is close to you.
2. Configure SSH. Create a key that Elastic Beanstalk will assign to the EC2 instances in your environment to allow you to connect to them later. You can also choose an existing key pair if you have the private key locally.
68
+
69
+
~/drupal-beanstalk$ eb init
70
+
Do you want to set up SSH for your instances?
71
+
(y/n): y
72
+
73
+
Select a keypair.
74
+
1) [ Create new KeyPair ]
75
+
(default is 1): 1
76
+
77
+
Type a keypair name.
78
+
(Default is aws-eb): beanstalk-drupal
79
+
80
+
3. Create an Elastic Beanstalk environment with a MySQL database.
Platform: 64bit Amazon Linux 2016.09 v2.2.0 running PHP 7.0
92
+
Tier: WebServer-Standard
93
+
CNAME: UNKNOWN
94
+
Updated: 2016-11-01 12:20:27.730000+00:00
95
+
Printing Status:
96
+
INFO: createEnvironment is starting.
34
97
35
98
## Networking configuration
36
99
Modify the configuration files in the .ebextensions folder with the IDs of your [default VPC and subnets](https://console.aws.amazon.com/vpc/home#subnets:filter=default), and [your public IP address](https://www.google.com/search?q=what+is+my+ip).
37
100
38
-
-`.ebextensions/efs-create.config` creates an EFS file system and mount points in each Availability Zone / subnet in your VPC.
39
-
-`.ebextensions/dev.config` restricts access to your environment to your IP address to protect it during the Drupal installation process.
101
+
-`.ebextensions/efs-create.config` creates an EFS file system and mount points in each Availability Zone / subnet in your VPC. Identify your default VPC and subnet IDs in the [VPC console](https://console.aws.amazon.com/vpc/home#subnets:filter=default). If you have not used the console before, use the region selector to select the same region that you chose for your environment.
102
+
-`.ebextensions/ssh.config` restricts access to your environment to your IP address to protect it during the Drupal installation process. Replace the placeholder IP address near the top of the file with your public IP address.
40
103
41
104
## Deploy Drupal to your environment
42
-
Deploy the project code to your Elastic Beanstalk environment.
105
+
Deploy the project code to your Elastic Beanstalk environment.
43
106
44
107
First, confirm that your environment is `Ready` with `eb status`. Environment creation takes about 15 minutes due to the RDS DB instance provisioning time.
45
108
46
-
```
47
-
$ eb status
48
-
$ eb deploy
109
+
```Shell
110
+
~/drupal-beanstalk$ eb status
111
+
~/drupal-beanstalk$ eb deploy
49
112
```
50
113
51
114
### NOTE: security configuration
@@ -58,7 +121,7 @@ You can [view the related SGs in the EC2 console](https://console.aws.amazon.com
58
121
59
122
Open your site in a browser.
60
123
61
-
```
124
+
```Shell
62
125
~/drupal-beanstalk$ eb open
63
126
```
64
127
@@ -78,36 +141,42 @@ The installation process created a file named `settings.php` in the `sites/defau
78
141
79
142
The project includes a settings file that uses environment variables to provide secrets to the application. Create a copy of this file named `settings.php`.
This file reads variables for the database connection, which are provided by Elastic Beanstalk when you create a database instance inside your environment. It also reads variables named `HASH_SALT` and `SYNC_DIR`.
86
149
87
150
The hash salt can be any value but shouldn't be stored in source control. Use `eb setenv` to set this variable directly on the environment.
0 commit comments