Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split common library parts into a separate workspace #39

Merged
merged 3 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,31 @@
name = "azure-init"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
repository = "https://github.com/Azure/azure-init/"
homepage = "https://github.com/Azure/azure-init/"
license = "MIT"
readme = "README.md"
description = "A reference implementation for provisioning Linux VMs on Azure."

[dependencies]
reqwest = { version = "0.11.18", default-features = false, features = ["blocking", "json"] }
serde = {version = "1.0.163", features = ["derive"]}
serde_xml = "0.9.1"
serde_derive = "1.0"
tokio = { version = "1", features = ["full"] }
serde-xml-rs = "0.6.0"
xml-rs = "0.8.13"
serde_json = "1.0.96"
rustfmt = "0.10.0"
nix = "0.26.2"
libc = "0.2.146"
fmt = "0.1.0"

[dependencies.libazureinit]
path = "libazureinit"
version = "0.1.0"

[profile.dev]
incremental = true

[lib]
name = "lib"
path = "src/lib.rs"

[[bin]]
name = "azure-init"
path = "src/main.rs"

[[bin]]
name = "functional_tests"
path = "tests/functional_tests.rs"

[workspace]
members = [
"libazureinit",
]
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

[![Github CI](https://github.com/Azure/azure-init/actions/workflows/ci.yaml/badge.svg)](https://github.com/Azure/azure-init/actions)

A minimal guest agent implementation for provisioning Linux VMs on Azure.
A reference implementation for provisioning Linux VMs on Azure.

The agent configures Linux guests from provisioning metadata.
Contrary to complex guest configuration and customisation systems like e.g. cloud-init, Azure-Init aims to be minimal.
Azure-init configures Linux guests from provisioning metadata.
Contrary to complex guest configuration and customisation systems like e.g. cloud-init, azure-init aims to be minimal.
It strictly focuses on basic instance initialisation from Azure metadata.

Azure-Init has very few requirements on its environment, so it may run in a very early stage of the boot process.
Azure-init has very few requirements on its environment, so it may run in a very early stage of the boot process.

## Installing Rust

Expand Down
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Feel free to [start a new discussion](https://github.com/Azure/azure-init/discus

## Microsoft Support Policy

Support for the Azure-Init is limited to the resources listed above.
Support for the azure-init is limited to the resources listed above.
26 changes: 26 additions & 0 deletions libazureinit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "libazureinit"
version = "0.1.1"
edition = "2021"
repository = "https://github.com/Azure/azure-init/"
homepage = "https://github.com/Azure/azure-init/"
license = "MIT"
description = "A common library for provisioning Linux VMs on Azure."

[dependencies]
reqwest = { version = "0.11.18", default-features = false, features = ["blocking", "json"] }
serde = {version = "1.0.163", features = ["derive"]}
serde_xml = "0.9.1"
serde_derive = "1.0"
tokio = { version = "1", features = ["full"] }
serde-xml-rs = "0.6.0"
xml-rs = "0.8.13"
serde_json = "1.0.96"
rustfmt = "0.10.0"
nix = "0.26.2"
libc = "0.2.146"

[lib]
name = "libazureinit"
path = "src/lib.rs"

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use lib::distro::{Distribution, Distributions};
use lib::{goalstate, imds, media, user};
use libazureinit::distro::{Distribution, Distributions};
use libazureinit::{goalstate, imds, media, user};

#[tokio::main]
async fn main() {
Expand Down
6 changes: 3 additions & 3 deletions tests/functional_tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

use lib::distro::{Distribution, Distributions};
use lib::imds::PublicKeys;
use lib::{goalstate, user};
use libazureinit::distro::{Distribution, Distributions};
use libazureinit::imds::PublicKeys;
use libazureinit::{goalstate, user};

use std::env;

Expand Down
Loading