Open andir opened 3 years ago
To view the list of existing deployments, the first step would be to run nixops list
Example
$ nixops list
+--------------------------------------+----------------+----------------------------------+------------+------+
| UUID | Name | Description | # Machines | Type |
+--------------------------------------+----------------+----------------------------------+------------+------+
| c381a5ee-bfb5-11ea-91ff-f430b9cbe870 | digital-ocean | Unnamed NixOps network | 0 | |
| a71b3f0c-9178-11ea-86f7-f430b9cbe870 | grafana-test | Grafana Dashboard Example | 0 | |
| 0412ff9a-2dad-11eb-8fed-dd571b16a7af | rds-snapshot | NixOps RDS Testing | 0 | |
| 3482ba64-a389-11ea-9274-f430b9cbe870 | test-aws | Test AWS instance | 0 | |
| 5ffb7db8-a275-11ea-a860-f430b9cbe870 | test-gcp | trivial GCP example | 0 | |
| 94ce856e-3e32-11eb-9133-378af37e2168 | zabbix | Zabbix NixOS | 0 | |
+--------------------------------------+----------------+----------------------------------+------------+------+
You can then select a deployment to view its info with the -d flag
$ nixops info -d test-gcp
Network name: test-gcp
Network UUID: 5ffb7db8-a275-11ea-a860-f430b9cbe870
Network description: trivial GCP example
Nix expressions: /home/tewfikghariani/repositories/nix-community/nixops-gce-master/examples/machine-with-disk.nix
Nix arguments: description = "trivial GCP example", gcpProject = "operations", accessKey = /data/keys/gce.pem
+-----------------+---------+-----------------------+-------------+------------+
| Name | Status | Type | Resource Id | IP address |
+-----------------+---------+-----------------------+-------------+------------+
| frontend | Missing | gce [us-east1-b] | | |
| frontend-volume | Missing | gce-disk [us-east1-b] | | |
+-----------------+---------+-----------------------+-------------+------------+
To create a new deployment, you can use the create command
nixops create -d new-deployment /home/network.nix
With "network.nix" being the main file for the physical and logical architecture of your deployment
Just started playing around with the current master branch of NixOps and ran into the following:
Not sure if that is the intended behavior but it doesn't look good as a first time experience.