Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 68b2ec93cb | |||
| f52de3c602 | |||
| ca02aa1da6 | |||
| 88a86bfab1 |
@@ -1,9 +1,9 @@
|
|||||||
## What's this?
|
## What's this?
|
||||||
`getenv` will fetch GCE metadata attributes and print them as K=V pairs ready to be `exported` as environment variables.
|
`getenv` will fetch Google Cloud (Compute Engine) metadata attributes and print them as K=V pairs ready to be `exported` as environment variables.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```bash
|
```bash
|
||||||
./getenv
|
getenv
|
||||||
MY_VARIABLE=SOMEVALUE
|
MY_VARIABLE=SOMEVALUE
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -11,11 +11,11 @@ MY_VARIABLE=SOMEVALUE
|
|||||||
|
|
||||||
Export all metadata attributes as ENV variables for current shell session and store them in /etc/environment for future sessions:
|
Export all metadata attributes as ENV variables for current shell session and store them in /etc/environment for future sessions:
|
||||||
```bash
|
```bash
|
||||||
export $(./getenv)
|
export $(getenv)
|
||||||
./getenv 1>> /etc/environment
|
getenv 1>> /etc/environment
|
||||||
```
|
```
|
||||||
or
|
or
|
||||||
```bash
|
```bash
|
||||||
./getenv 1>> /etc/environment
|
getenv 1>> /etc/environment
|
||||||
source /etc/environment
|
source /etc/environment
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user